From: SourceForge.net <no...@so...> - 2009-08-12 12:18:02
|
Bugs item #2836185, was opened at 2009-08-12 08:17 Message generated for change (Tracker Item Submitted) made by peterjhurley You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=2836185&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: gcc Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Peter Hurley (peterjhurley) Assigned to: Nobody/Anonymous (nobody) Summary: [gcc-4.4.0] Dll fails to build with shared libstdc++ Initial Comment: The following code fails to link uisng gcc-4.4.0-mingw with undefined references: /* * dllmain.cpp */ #include <exception> void my_baaaaad_function() { throw std::exception(); } Compiled/attempted link with: g++ -D_GLIBCXX_DLL -O0 -g3 -Wall -c -odllmain.o ..\dllmain.cpp g++ -shared-libgcc -shared -otestdll.dll dllmain.o -lstdc++_s The problem appears to be that the system headers <exception>,<typeinfo> and <new> use _GLIBCXX_DLL to decorate the exception classes. However those classes are not included in the libstdc++_s.a archive (nor in the libstdc++-6.dll). A workaround is to remove the decorations from those system headers. -- Build environment -- Windows XP Pro SP3 intel harpertown gcc-4.4.0-mingw binutils-2.19.1 w32api-3.13 mingw32-make-3.81 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=2836185&group_id=2435 |