Bug? Error in phobos?

Regan Heath regan at netmail.co.nz
Fri Sep 21 07:53:55 PDT 2007


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. 

That's what I thought might be happening.

> Try dropping the pragma (lib) and explictly linking 
> c:\dmd\lib\WS2_32.LIB directly.

No such luck :(

E:\D\src\tmp>dmd bug003 e:\d\dmd\lib\ws2_32.lib
E:\D\dmd\bin\..\..\dm\bin\link.exe 
bug003,,,e:\d\dmd\lib\ws2_32.lib+user32+kerne
l32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

E:\D\dmd\bin\..\lib\phobos.lib(winsock)  Offset 276FEH Record Type 00C3
  Error 1: Previous Definition Different : _ntohl at 4
--- errorlevel 1

I tried wsock32.lib, ws2_32.lib at prompt, as pragmas, nothing seems to 
want to link.

Regan



More information about the Digitalmars-d mailing list