December 17, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1737

           Summary: A strange "Previous Definition Different"
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: zsp007@gmail.com


I create a new project with IDE poseidon and the lastest DMD2.
Complie below code with option "-g"
A strange "Previous Definition Different" happend.

Code:

import std.c.windows.windows, std.c.windows.winsock;

static this(){
        WSADATA wd;
}
int main (){
        htons(9001);
        return 0;
}

Complie Information

Command >>> ReBuilding Project: stalk...... D:\myWay\env\d\env\dmd\bin\dmd.exe D:\myWay\D\stalk\stalk.d -ofstalk - ID:\myWay\env\d\env\dmd\import D:\myWay\env\d\env\dmd\lib\WS2_32.LIB - odobjs -g

D:\myWay\env\d\env\dmd\bin\..\..\dm\bin\link.exe objs\stalk,stalk,,D: \myWay\env\d\env\dmd\lib\WS2_32.LIB+user32+kernel32/co/noi;

OPTLINK (R) for Win32 Release 8.00.1
Copyright (C) Digital Mars 1989-2004 All rights reserved.
D:\myWay\env\d\env\dmd\bin\..\lib\phobos.lib(winsock) Offset 2597FH
Record Type 00C3
Error 1: Previous Definition Different : _htons@4


-- 

December 18, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1737


davidl@126.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




------- Comment #1 from davidl@126.com  2007-12-17 20:32 -------
Phobos already has this htons symbol. So don't link with WS2_32.LIB again. Then the problem goes away.


--