From: Jean-Claude G. <jc....@vi...> - 2011-07-17 21:15:28
|
Hello! I am unable to link a DLL: i686-pc-mingw32-g++ --version (Gentoo 4.5.2 p1.1, pie-0.4.5) 4.5.2 ------ libmain.cpp #include <vector> extern "C" int simplecall( const char * pszHello ) { std::vector<int> s; return 0; } ------ i686-pc-mingw32-g++ -g -I/usr/i686-pc-mingw32/usr/include -DWINDOWS -D_WINDOWS -DWIN32 -D_M_IX86 -DDEBUG -Wall -c -o libmain.o libmain.cpp i686-pc-mingw32-g++ -o ./libsimplelib.so.1~ -shared -lwsock32 -lcomctl32 -Wl,-soname,libsimplelib.so.1 libmain.o libmain.o: In function `~vector': /usr/lib/gcc/i686-pc-mingw32/4.5.2/include/g++-v4/bits/stl_vector.h:312: undefined reference to `___gxx_personality_sj0' libmain.o: In function `~_Vector_base': /usr/lib/gcc/i686-pc-mingw32/4.5.2/include/g++-v4/bits/stl_vector.h:131: undefined reference to `___gxx_personality_sj0' libmain.o: In function _ZN9__gnu_cxx13new_allocatorIiE10deallocateEPij': /usr/lib/gcc/i686-pc-mingw32/4.5.2/include/g ++-v4/ext/new_allocator.h:95: undefined reference to `operator delete(void*)' The same code compiles OK with g++ Please help me, I'm sure I forgot something but I can't figure out what |