Bug? Error in phobos?

Regan Heath regan at netmail.co.nz
Sat Sep 22 05:20:43 PDT 2007


Carlos Santander wrote:
> Regan Heath escribió:
>  > import std.socket;
>  > import std.c.windows.winsock;
>  >
>  > pragma(lib, "wsock32.lib");
>  >
>  > class IndexPacketReader
>  > {
>  >     //static void foo()  //works
>  >     void foo()
>  >     {
>  >         ntohl(1);  //fails
>  >     }
>  > }
>  >
>  > void main()
>  > {
>  >     new TcpSocket();
>  >     //ntohl(1); //works
>  > }
>  >
>  > E:\D\src\tmp>dmd bug003.d
>  > E:\D\dmd\bin\..\..\dm\bin\link.exe bug003,,,user32+kernel32/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
>  >
>  > Anyone know what this means?
>  >
>  > Regan
> 
> Can you check if std.socket already has pragma(lib) ?

Ok... It does not.

In fact "pragma" is not used in phobos at all.

Regan



More information about the Digitalmars-d mailing list