undefined reference to `__gxx_personality_sj0'

Sorry to bother you guys again, still having trouble with compiling wxwidgets and boost into my app.

Getting a load of errors like that one, see the compile command and the full output (with -v) here: http://pastebin.com/Jc774Wn1

Google tells me this is due to me compiling either the libraries or the app with different compilers or versions of the same compiler. But I only have one MinGW installation on the computer. Although I do have visual studio as well, from checking the compilation output I'm pretty sure it's only ever using stuff in the mingw/bin folder (though I may be wrong).

To build boost I used:

bootstrap mingw
.\b2 -j3 toolset=gcc variant=debug link=static threading=multi address-model=32 runtime-link=static,shared

End of build output, quite a few warnings in this one:

In file included from ./boost/spirit/home/classic/core.hpp:32:0,
                 from ./boost/spirit/include/classic_core.hpp:11,
                 from ./boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp:25,
                 from libs\wave\src\instantiate_re2c_lexer_str.cpp:29:
./boost/spirit/home/classic/core/primitives/primitives.hpp: In member function 'typename boost::spirit::classic::parser_result<DerivedT, ScannerT>::type boost::spirit::classic::char_parser<DrivedT>::parse(const ScannerT&) const':
./boost/spirit/home/classic/core/primitives/primitives.hpp:50:68: warning: typedef 'result_t' locally defined but not used
[-Wunused-local-typedefs]
             typedef typename parser_result<self_t, ScannerT>::type result_t;
                                                                    ^
In file included from ./boost/bind/bind.hpp:29:0,
                 from ./boost/bind.hpp:22,
                 from ./boost/thread/win32/once.hpp:25,
                 from ./boost/thread/once.hpp:15,
                 from ./boost/spirit/home/classic/core/non_terminal/impl/object_with_id.ipp:18,
                 from ./boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp:15,
                 from ./boost/spirit/home/classic/core/non_terminal/grammar.hpp:21,
                 from ./boost/spirit/home/classic/core.hpp:42,
                 from ./boost/spirit/include/classic_core.hpp:11,
                 from ./boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp:25,
                 from libs\wave\src\instantiate_re2c_lexer_str.cpp:29:
./boost/bind/arg.hpp: In constructor 'boost::arg<I>::arg(const T&)':
./boost/bind/arg.hpp:37:22: warning: typedef 'T_must_be_placeholder' locally defined but not used [-Wunused-local-typedefs]
         typedef char T_must_be_placeholder[ I == is_placeholder<T>::value? 1: -1 ];
                      ^
In file included from ./boost/spirit/home/classic/core/non_terminal/grammar.hpp:21:0,
                 from ./boost/spirit/home/classic/core.hpp:42,
                 from ./boost/spirit/include/classic_core.hpp:11,
                 from ./boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp:25,
                 from libs\wave\src\instantiate_re2c_lexer_str.cpp:29:
./boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp: In function 'void boost::spirit::classic::impl::grammar_destruct(GrammarT*)':
./boost/spirit/home/classic/core/non_terminal/impl/grammar.ipp:310:68: warning: typedef 'iterator_t' locally defined but not used [-Wunused-local-typedefs]
         typedef typename helper_list_t::vector_t::reverse_iterator iterator_t;
                                                                    ^
gcc.compile.c++ bin.v2\libs\wave\build\gcc-mingw-4.8.1\debug\address-model-32\link-static\threading-multi\cpplexer\re2clex\cpp_re.o
gcc.archive bin.v2\libs\wave\build\gcc-mingw-4.8.1\debug\address-model-32\link-static\threading-multi\libboost_wave-mgw48-mt-d-1_55.a
common.copy stage\lib\libboost_wave-mgw48-mt-d-1_55.a
bin.v2\libs\wave\build\gcc-mingw-4.8.1\debug\address-model-32\link-static\threading-multi\libboost_wave-mgw48-mt-d-1_55.a
        1 file(s) copied.
...failed updating 4 targets...
...skipped 6 targets...
...updated 932 targets...



To build wxwidgets I used:

mingw32-make -f makefile.gcc SHARED=0 UNICODE=1 BUILD=debug MONOLITHIC=0

End of the build output:

g++ -c -o gcc_mswud\gllib_glcmn.o -g -O0 -mthreads  -DHAVE_W32API_H -D__WXMSW__       -D_UNICODE  -I..\..\lib\gcc_lib\mswud -I..\..\include  -W -Wall -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib   -Wno-ctor-dtor-privacy   -MTgcc_mswud\gllib_glcmn.o -MFgcc_mswud\gllib_glcmn.o.d -MD -MP
../../src/common/glcmn.cpp
g++ -c -o gcc_mswud\gllib_glcanvas.o -g -O0 -mthreads  -DHAVE_W32API_H -D__WXMSW__       -D_UNICODE  -I..\..\lib\gcc_lib\mswud -I..\..\include  -W -Wall -DWXBUILDING -I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex -I..\..\src\expat\lib   -Wno-ctor-dtor-privacy   -MTgcc_mswud\gllib_glcanvas.o -MFgcc_mswud\gllib_glcanvas.o.d -MD -MP ../../src/msw/glcanvas.cpp
if exist ..\..\lib\gcc_lib\libwxmsw30ud_gl.a del ..\..\lib\gcc_lib\libwxmsw30ud_gl.a
ar rcu ..\..\lib\gcc_lib\libwxmsw30ud_gl.a gcc_mswud\gllib_dummy.o gcc_mswud\gllib_glcmn.o gcc_mswud\gllib_glcanvas.o
ranlib ..\..\lib\gcc_lib\libwxmsw30ud_gl.a


Any ideas??? Thanks!
Last edited on
It has to do with exception handling / using incompatible compiler. Read this:

http://stackoverflow.com/questions/7751640/undefined-reference-to-gxx-personality-sj0
Topic archived. No new replies allowed.