error LNK2001: unresolved external symbol __imp__inet_ntoa@4문제 해결

1415 단어
개발 환경: VC 6.0
오류 설명 발생
--------------------Configuration: SocketClient - Win32 Debug--------------------
Linking...
SocketClient.obj : error LNK2001: unresolved external symbol __imp__inet_ntoa@4
SocketClient.obj : error LNK2001: unresolved external symbol __imp__recvfrom@24
SocketClient.obj : error LNK2001: unresolved external symbol __imp__WSAJoinLeaf@32
SocketClient.obj : error LNK2001: unresolved external symbol __imp__inet_addr@4
SocketClient.obj : error LNK2001: unresolved external symbol __imp__closesocket@4
SocketClient.obj : error LNK2001: unresolved external symbol __imp__bind@12
SocketClient.obj : error LNK2001: unresolved external symbol __imp__htons@4
SocketClient.obj : error LNK2001: unresolved external symbol __imp__WSACleanup@0
SocketClient.obj : error LNK2001: unresolved external symbol __imp__WSAGetLastError@0
SocketClient.obj : error LNK2001: unresolved external symbol __imp__WSASocketA@24
SocketClient.obj : error LNK2001: unresolved external symbol __imp__WSAStartup@8
Debug/SocketClient.exe : fatal error LNK1120: 11 unresolved externals
Error executing link.exe.

SocketClient.exe - 12 error(s), 0 warning(s)

해결:
1. 헤드 파일 추가:
#include
2. 메뉴 표시줄 -------->Project------>Settings-------->Link 탭---------->Object/library modules---------->ws2_ 가입32.lib-----> 연결 재컴파일 -----> 해결.

좋은 웹페이지 즐겨찾기