compile bug

Dan Abretske danthemanisdead at gmail.com
Mon Dec 11 22:33:51 PST 2006


So I have a somewhat odd windows bug. Not sure if learn is the right 
place to ask this but....

I have a pragma to link in ws2_32.lib in my code for windows builds
and I have code that makes use of htonl(). When I compile code that 
doesn't use htonl() but makes use of sockets the code compiles and runs 
fine.  When I use code that uses htonl() but no sockets the code 
compiles and runs fine.
But when I try to compile code using both sockets and htonl() I get the 
following error.

C:\dmd\lib\phobos.lib(winsock)  Offset 1D966H Record Type 00C3
  Error 1: Previous Definition Different : _htonl at 4


I'm using the build tool(bud.exe) to do my compiling and linking for me 
and it's not let me down yet so I'm hoping it's not build but I'm really 
not sure what to do about this error.  I opened up phobos.lib with vim 
and looked around abit and the string _htonl at 4 appears 3 seperate places 
in the lib file... then again reading lib files isn't all that 
informative due to the whole not human readable thing.

Cheers,

Dan


More information about the Digitalmars-d-learn mailing list