compile bug

Dan Abretske danthemanisdead at
Tue Dec 12 22:11:58 PST 2006

Alright I'll check that.

The odd resolution to my problem was to move my main functions to 
separate files and then run build on those files but import the original 
file. I'm still not sure what's wrong but at least I got it working :)


Thomas Kuehne wrote:
> Hash: SHA1
> Dan Abretske schrieb am 2006-12-12:
>> 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 don't have a Window box at hand)
> Does ws2_32.lib define a _htonl at 4 symbol?
> If it does it clashs with and you should
> file a Phobos bug.
> Thomas
> iD8DBQFFfyL9LK5blCcjpWoRAjLcAJ9wISBfmEi21vNcOoODzWq7EERnwwCfaY/V
> 9kaVAEFIEPV1nfa7bLA5UHU=
> =62XU

More information about the Digitalmars-d-learn mailing list