DMD的诡异"Previous Definition Different"错误

我用poseidon新建一个全新工程
编译参数加入-g(就是加入调试信息),
试一试如下代码,就会有如"Previous Definition Different"

代码:

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

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

很奇怪...


完整的错误信息如下
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

提交了这个bug

http://d.puremagic.com/issues/show_bug.cgi?id=1737+

你可能感兴趣的:(C++,c,windows,C#,cgi)