Code::Blocks+wxWidgets: Building the library

These are the errors I get when trying to compile a wxSmith/Widgets project using codeblocks:

C:\programmingtools\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28ud.a(monolib_appbase.o)||In function `wxAppConsole':|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|122|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|122|undefined reference to `__Unwind_SjLj_Register'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|135|undefined reference to `__Unwind_SjLj_Unregister'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|138|undefined reference to `__Unwind_SjLj_Resume'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|122|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|122|undefined reference to `__Unwind_SjLj_Register'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|135|undefined reference to `__Unwind_SjLj_Unregister'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|138|undefined reference to `__Unwind_SjLj_Resume'|
C:\programmingtools\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28ud.a(monolib_appbase.o)||In function `~wxAppConsole':|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|140|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|140|undefined reference to `__Unwind_SjLj_Register'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|143|undefined reference to `__Unwind_SjLj_Resume'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|143|undefined reference to `__Unwind_SjLj_Unregister'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|140|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|140|undefined reference to `__Unwind_SjLj_Register'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|143|undefined reference to `__Unwind_SjLj_Resume'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|143|undefined reference to `__Unwind_SjLj_Unregister'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|140|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|140|undefined reference to `__Unwind_SjLj_Register'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|143|undefined reference to `__Unwind_SjLj_Resume'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|143|undefined reference to `__Unwind_SjLj_Unregister'|
C:\programmingtools\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28ud.a(monolib_appbase.o)||In function `_ZN12wxAppConsole10InitializeERiPPw':|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|150|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|150|undefined reference to `__Unwind_SjLj_Register'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|159|undefined reference to `__Unwind_SjLj_Resume'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|163|undefined reference to `__Unwind_SjLj_Unregister'|
C:\programmingtools\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28ud.a(monolib_appbase.o)||In function `_ZN12wxAppConsole6OnInitEv':|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|175|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|175|undefined reference to `__Unwind_SjLj_Register'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|201|undefined reference to `__Unwind_SjLj_Resume'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|201|undefined reference to `__Unwind_SjLj_Unregister'|
C:\programmingtools\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28ud.a(monolib_appbase.o)||In function `_ZN12wxAppConsole15OnCmdLineParsedER15wxCmdLineParser':|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|375|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|375|undefined reference to `__Unwind_SjLj_Register'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|377|undefined reference to `__Unwind_SjLj_Resume'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|385|undefined reference to `__Unwind_SjLj_Unregister'|
C:\programmingtools\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28ud.a(monolib_appbase.o)||In function `_ZN12wxAppConsole17CheckBuildOptionsEPKcS1_':|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|411|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|411|undefined reference to `__Unwind_SjLj_Register'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|430|undefined reference to `__Unwind_SjLj_Resume'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|434|undefined reference to `__Unwind_SjLj_Unregister'|
C:\programmingtools\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28ud.a(monolib_appbase.o)||In function `_ZN22wxConsoleAppTraitsBase15CreateLogTargetEv':|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|478|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|478|undefined reference to `__Unwind_SjLj_Register'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|479|undefined reference to `__Unwind_SjLj_Unregister'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|479|undefined reference to `__Unwind_SjLj_Resume'|
C:\programmingtools\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28ud.a(monolib_appbase.o)||In function `_ZN22wxConsoleAppTraitsBase16CreateFontMapperEv':|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|492|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|492|undefined reference to `__Unwind_SjLj_Register'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|493|undefined reference to `__Unwind_SjLj_Unregister'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|493|undefined reference to `__Unwind_SjLj_Resume'|
C:\programmingtools\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28ud.a(monolib_appbase.o)||In function `_ZN15wxAppTraitsBase16ShowAssertDialogERK8wxString':|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|541|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|541|undefined reference to `__Unwind_SjLj_Register'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|557|undefined reference to `__Unwind_SjLj_Unregister'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|557|undefined reference to `__Unwind_SjLj_Resume'|
C:\programmingtools\wxWidgets-2.8.12\lib\gcc_lib\libwxmsw28ud.a(monolib_appbase.o)||In function `_Z10wxOnAssertPKwiPKcS0_S0_':|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|686|undefined reference to `___gxx_personality_sj0'|
C:\programmingtools\wxWidgets-2.8.12\build\msw\..\..\src\common\appbase.cpp|686|undefined reference to `__Unwind_SjLj_Register'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|
As you can see, there are a lot. I can not seem to figure out why it wont work. Please read the origional post. it has turned into a boost post now.

ORIGIONAL POST: http://www.cplusplus.com/forum/general/81835/

That will help you understand my troubles so far.

Now, I successfully (no errors...) built wxWidgets using some of the instructions given to me by some very helpful people. When I created a new project (matching the settings to my build: monolithic=1 unicode=1 shared=0) and tried tocompile it, it returned the above errors. I don't know why it is doing this, as I am new to building libraries myself and google searches apparently don't do this justice, so I have come to the foprums for yalls help in this matter.

System Specs:

OS: W7
IDE: Code::Blocks(10.05)
Compiler: MinGW (latest)
GUI Library: wxWidgets(2.8.12)

Any advice will greatly help! Thank you for your time.
Those look like linker errors, have you set the wxWidgets/lib path in Code::Blocks?

Edit: Google search suggests its a toolchain issue, check if compiler and linker match in Code::Blocks settings.
Last edited on
(I didn't make the monolithic wxwidget build - I did shared build)

Google throws up Lots of similar worded n problems and it seems that a number of issues can cause this sort of problem.

One possible one in your case is to make sure that the toolchain excutable names are correct in the codeblocks menu settings->Compiler and Debugger -> toolchain executables. tab.

C compiler should be gcc
C++ compiler should be g++
Linker for dynamic build should be g++


Do a project clean and rebuild and cross fingers.


Nope, all those are good.

I will try somthing. I checked precompiled header, and mabey thats the problem.
nope... didnt work. No matter what I do, it takes me to appbase.cpp and goes top the function wxAppConsole::wxAppConsole(), at least for the first set of errors.

It freezes up and stops compiling too. I don't understand this...

edit1: Hold on, i checked my global variables, and it says for "wx" in default in the 'base' textbox: "C:\Program Files\wxSmith"

There is no such folder in sub-directory 'Program Files'. Could this be the problem?
Last edited on
Please, I really would like to get started making GUIs.....

I can't seem to fix all these errors.
Is there somthing I have to do with Code::Blocks to get it to work with wxWidgets?
Topic archived. No new replies allowed.