已经包含了"winsock.h",在链接时为什么还是找不到?
Linking...
appl.obj : error LNK2001: unresolved external symbol _WSACleanup@0
appl.obj : error LNK2001: unresolved external symbol _WSAStartup@8
appl.obj : error LNK2001: unresolved external symbol ___WSAFDIsSet@8
appl.obj : error LNK2001: unresolved external symbol _select@20
marshal.obj : error LNK2001: unresolved external symbol _htons@4
net.obj : error LNK2001: unresolved external symbol _htons@4
psrm.obj : error LNK2001: unresolved external symbol _htons@4
sockaddr.obj : error LNK2001: unresolved external symbol _htons@4
marshal.obj : error LNK2001: unresolved external symbol _htonl@4
net.obj : error LNK2001: unresolved external symbol _htonl@4
marshal.obj : error LNK2001: unresolved external symbol _ntohs@4
sockaddr.obj : error LNK2001: unresolved external symbol _ntohs@4
marshal.obj : error LNK2001: unresolved external symbol _ntohl@4
net.obj : error LNK2001: unresolved external symbol _socket@12
net.obj : error LNK2001: unresolved external symbol _WSAGetLastError@0
net.obj : error LNK2001: unresolved external symbol _bind@12
net.obj : error LNK2001: unresolved external symbol _gethostbyname@4
net.obj : error LNK2001: unresolved external symbol _gethostname@8
net.obj : error LNK2001: unresolved external symbol _sendto@24
net.obj : error LNK2001: unresolved external symbol _recvfrom@24
net.obj : error LNK2001: unresolved external symbol _accept@12
net.obj : error LNK2001: unresolved external symbol _setsockopt@20
net.obj : error LNK2001: unresolved external symbol _connect@12
psrm.obj : error LNK2001: unresolved external symbol _lrint
sockaddr.obj : error LNK2001: unresolved external symbol _getsockname@12
sockaddr.obj : error LNK2001: unresolved external symbol _inet_addr@4
sockaddr.obj : error LNK2001: unresolved external symbol _inet_ntoa@4
times.obj : error LNK2001: unresolved external symbol _gettimeofday
util.obj : error LNK2001: unresolved external symbol _gettimeofday
Debug/psrm.exe : fatal error LNK1120: 23 unresolved externals
Error executing link.exe.
还需要加其它库吗?还是我建立程序方法不对?
步骤如下:
1、建立win32 console application,empty project~
2、把编好的.c.h添加进来,
3、编译、链接
请高人指教~