MingW compilation errors
I have managed to build the boost libraries with b2 and the gcc toolset option. Alas, whenever I use a header which invokes such a library in Code::Blocks chained with MingW I get these errors: undefined reference to _Unwind_SiLj_Register undefined reference to _Unwind_SiLj_Unregister undefined reference to _Unwind_SiLj_Resume undefined reference to __gxx_personality_sj0 undefined reference to _WSACleanup@0 undefined reference to _WSAStartup@8 All but the last two repeatedly. I would really appreciate anyone who could point me out of this mess. Thanks!
Alas, whenever I use a header which invokes such a library in Code::Blocks chained with MingW I get these errors:
undefined reference to _Unwind_SiLj_Register undefined reference to _Unwind_SiLj_Unregister undefined reference to _Unwind_SiLj_Resume
It has probably to do with sjlj exceptions in g++. Personnaly I build my own mingw cross compiler (linux->windows) with the following option: --disable-sjlj-exceptions. Otherwise, I can get that sort of issues. But then, I build boost with the cross compiler on linux. The toolset is gcc, not mingw. I can still use the libraries on windows with CodeBlocks. My command line for b2 is: ./b2 --layout=system --user-config=user-config.jam link=static theading=multi runtime-link=shared target-os=windows threadapi=win32 variant=release install with user-config.jam containing: using gcc : : i686-pc-mingw32-g++ : <compileflags>-DBOOST_THREAD_USE_LIB ; Hope this can help you. Cheers, Frédéric
I have managed to build the boost libraries with b2 and the gcc toolset option. Alas, whenever I use a header which invokes such a library in Code::Blocks chained with MingW I get these errors: undefined reference to _Unwind_SiLj_Register undefined reference to _Unwind_SiLj_Unregister undefined reference to _Unwind_SiLj_Resume undefined reference to __gxx_personality_sj0
These errors suggest that the boost libraries were compiled with a different version of gcc than the code that is trying to use them. Check which gcc version you used to build the boost libraries, and make sure that Code::Blocks is configured to use the same gcc version.
undefined reference to _WSACleanup@0 undefined reference to _WSAStartup@8
These errors suggest that you need to link your program to the winsock32 library. On the command line you would do this by adding the flag "-lws2_32" to the linker command. I'm not familiar with Code::Blocks, but presumably there is a dialog somewhere where you can specify linker options. Regards, Nate
participants (3)
-
Alice Gamewell
-
Frédéric Bron
-
Nathan Ridge