User forums > Using Code::Blocks

wxSingleChoiceDialog

(1/1)

Anonymous:
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

AkiraDev:
This has been bugging me for quite some time, thank you for presenting the workaround!  :D

mandrav:
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...

Anonymous:
well, seeing as Slackware doesn't provide wxWidgets at all, I have to either find hand made packages, or install it from source.

mandrav:
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

--- End code ---

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

HTH,
Yiannis.

Navigation

[0] Message Index

Go to full version