|
From: Luke D. <cod...@ho...> - 2002-07-03 01:17:57
|
----- Original Message ----- From: "Thomas Gentsch" <tg...@e-...> To: <min...@li...> Sent: Tuesday, July 02, 2002 11:56 PM Subject: [Mingw-users] dllwrap won't resolve socket functions > Hello, > > I'm trying to build a DLL using mingw and came to the point that I want > to link everything together. > Now I get lots of unresolved symbols, e.g.: > > > imsock.o: In function `IMSocket::SetHost(IMErrList *, char const *)': > > //bla/imsock.C:96: undefined reference to `inet_addr@4' > > //bla/imsock.C:100: undefined reference to `gethostbyaddr@12' > > most of them in the socket area. Now I tried to specify the socket libs > wsock32 and/or ws2_32 but that does not change anything. Maybe it's just > the way *how* to specify them?? > That's one of my attempts: > > > dllwrap -v --nodelete --export-all --output-def im.def --implib libim.a --driver-name c++ -o libim.dll --driver_flags=-L/c/mingw/lib -lwsock32 -lws2_32 imsock.o [ ... more object files ... ] dllinit.o > > Any help is greatly appreciated, > tge You may find it simpler (and faster) to use the gcc driver instead of dllwrap: g++ -shared -o libim.dll -Wl,--export-all -Wl,--output-def,im.def -Wl,--out-implib,libim.a imsock.o [ ... more object files ... ] -lwsock32 You should not need to add c:/mingw/lib to the library search path. > > PS: Is there a way to actually *search* the archive (geocrawler) or am I > just too stupid to see it ... ?? Go to http://www.mingw.org/ and enter your search. > > -- > ................................................ > Thomas Gentsch > -------------- > Phone: +49 711 486948 E-mail: tg...@e-... > Mobil: +49 173 6620507 > Fax: +49 711 4687889 WWW: www.e-tge.de > ................................................ Luke Dunstan |