Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Anonymous on January 18, 2005, 10:52:53 pm

Title: wxSingleChoiceDialog
Post by: Anonymous on January 18, 2005, 10:52:53 pm
In case anyone else gets the error "wxSingleChoiceDialog' undeclared (first use this function)" when compiling the file sdk/cbproject.cpp here's a work-around.

Add the lines

#ifndef wxUSE_CHOICEDLG
  #define wxUSE_CHOICEDLG 1
#endif

before the line

#include <wx/choicdlg.h>

I had this problem on SuSE 9.2 and Fedora Core 3 installations when compiling against wxWidgets 2.5.3 GTK2
Title: wxSingleChoiceDialog
Post by: AkiraDev on January 18, 2005, 11:54:22 pm
This has been bugging me for quite some time, thank you for presenting the workaround!  :D
Title: wxSingleChoiceDialog
Post by: mandrav on January 19, 2005, 12:22:33 am
Thanks for sharing this tip. It seems something's wrong with wxWidgets build in these distros. This definition should already exist in the distro-supplied <wx/setup.h> file...
Title: wxSingleChoiceDialog
Post by: Anonymous on March 04, 2005, 07:56:10 am
well, seeing as Slackware doesn't provide wxWidgets at all, I have to either find hand made packages, or install it from source.
Title: wxSingleChoiceDialog
Post by: mandrav on March 04, 2005, 10:22:36 am
The distros I 've used did not have wxGTK packages with gtk2 support, which is essential for codeblocks to work.
It 's pretty straightforward to build wxWidgets from sources (you have to have gtk2 installed):
Code
cd wxGTK-2.4.2
./configure --enable-gtk2
make
su -c "make install"

cd contrib/src/stc
make
su -c "make install"

cd ../xrc
make
su -c "make install"

su -c ldconfig

That should build the core wxWidgets library as wel as the XRC and STC libraries. That's all that codeblocks needs.

HTH,
Yiannis.