compile bug

Thomas Kuehne thomas-dloop at kuehne.cn
Tue Dec 12 13:13:31 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
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 std.c.windows.winsock.htonl and you should
file a Phobos bug.

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFFfyL9LK5blCcjpWoRAjLcAJ9wISBfmEi21vNcOoODzWq7EERnwwCfaY/V
9kaVAEFIEPV1nfa7bLA5UHU=
=62XU
-----END PGP SIGNATURE-----


More information about the Digitalmars-d-learn mailing list