Bug? Error in phobos?

dickl dick221z at yahoo.com
Tue Sep 25 19:59:27 PDT 2007


Looks like a phobos problem.

ntohl can be found in both phobos.lib and wsock32.lib.
If you don't link with wsock32.lib, the error relating to ntohl goes 
away (and creates other problems).

std.c.windows.socket has its own version of ntohl. It should either be a 
unique name or refer to wsock32.lib.


Dick

BCS wrote:
> Reply to Regan,
> 
> 
>>> Error 1: Previous Definition Different : _ntohl at 4
>>> --- errorlevel 1
>>> Anyone know what this means?
>>>
>> No-one??  This bug is particularly annoying because it prevents me
>> from calling ntohl, ntohs etc from within a class method.  In the end
>> I just wrote my own ntohl functin and called that.
>>
> 
> I don't known why your getting it, but you must have more than one ntohl 
> defined. The linker is finding this so I expect that one is in a lib. 
> Try dropping the pragma (lib) and explictly linking 
> c:\dmd\lib\WS2_32.LIB directly.
> 
>> Regan
>>
> 
> 



More information about the Digitalmars-d mailing list