www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Undefined symbol when linking correct library

reply V <v pathlink.com> writes:
I'm using WSA* functions for my project and WSAEventSelect seems to be 
causing a hiccup for DMD even though its contained within ws2_32.lib. 
I've declared it as extern(Windows) and linked in the lib but of all the 
WSA* functions, this one is the only one so far that is not working.

Is there a similar function in std.socket that does the same thing?  I'm 
converting a C project to D and I wanted to use the majority of the same 
functions from the win32 api.

Error:

Debug\Network.obj(Network)
  Error 42: Symbol Undefined _WSAEventSelect
--- errorlevel 1
Apr 26 2005
parent reply V <v pathlink.com> writes:
I compiled my program inside of visual studio with the following:

c:\dmd\dmd\bin\dmd.exe -g "$(IntDir)\*.obj" DebugServerDef.def 
ws2_32.lib -of"$(OutDir)\$(ProjectName).exe"

I noticed that when I remove the "-g" it compiles without error and runs 
normally.

V
Apr 26 2005
parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

V schrieb am Tue, 26 Apr 2005 17:15:43 -0700:
 I compiled my program inside of visual studio with the following:

 c:\dmd\dmd\bin\dmd.exe -g "$(IntDir)\*.obj" DebugServerDef.def 
 ws2_32.lib -of"$(OutDir)\$(ProjectName).exe"

 I noticed that when I remove the "-g" it compiles without error and runs 
 normally.
Please try to reduce the size of the D sources and send a bug report to digitalmars.D.bugs. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCbxxS3w+/yD4P9tIRAqVDAKDLk1/oDqipfdARQht29L03OumnVgCgg51/ q2ytDYjhMX1EUixrZyjeNa0= =gSUy -----END PGP SIGNATURE-----
Apr 26 2005