www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1737] New: A strange "Previous Definition Different"

reply d-bugmail puremagic.com writes:

           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.


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

static this(){
        WSADATA wd;
int main (){
        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:

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

Dec 17 2007
parent d-bugmail puremagic.com writes:

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.

Dec 17 2007