link时的错误
我的winsock通信的小程序:
头文件为:
#include <winsock2.h>
#include <ws2tcpip.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
调试环境为vc6.0,但是在link时,出现了如下错误,请问,该怎么解决,谢谢!!
错误为:
Linking...
ipv4_testcase_header_1.obj : error LNK2001: unresolved external symbol __imp__WSACleanup@0
ipv4_testcase_header_1.obj : error LNK2001: unresolved external symbol __imp__closesocket@4
ipv4_testcase_header_1.obj : error LNK2001: unresolved external symbol __imp__sendto@24
ipv4_testcase_header_1.obj : error LNK2001: unresolved external symbol __imp__inet_addr@4
ipv4_testcase_header_1.obj : error LNK2001: unresolved external symbol __imp__htons@4
ipv4_testcase_header_1.obj : error LNK2001: unresolved external symbol __imp__setsockopt@20
ipv4_testcase_header_1.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0
ipv4_testcase_header_1.obj : error LNK2001: unresolved external symbol __imp__WSASocketA@24
ipv4_testcase_header_1.obj : error LNK2001: unresolved external symbol __imp__WSAStartup@8
Debug/ipv4_testcase_header_1.exe : fatal error LNK1120: 9 unresolved externals
Error executing link.exe.