题目:关于error LNK2001: unresolved external symbol __imp__gethostbyaddr@12
问题描述:Deleting intermediate files and output files for project 'WSAChat - Win32 Debug'.
--------------------Configuration: WSAChat - Win32 Debug--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
WSAChat.cpp
WSAChatDlg.cpp
Generating Code...
Linking...
LINK : warning LNK4075: ignoring /INCREMENTAL due to /FORCE specification
WSAChat.obj : error LNK2001: unresolved external symbol __imp__WSACleanup@0
WSAChat.obj : error LNK2001: unresolved external symbol __imp__WSAStartup@8
WSAChatDlg.obj : error LNK2001: unresolved external symbol __imp__closesocket@4
WSAChatDlg.obj : error LNK2001: unresolved external symbol __imp__WSAAsyncSelect@16
WSAChatDlg.obj : error LNK2001: unresolved external symbol __imp__bind@12
WSAChatDlg.obj : error LNK2001: unresolved external symbol __imp__htons@4
WSAChatDlg.obj : error LNK2001: unresolved external symbol __imp__htonl@4
WSAChatDlg.obj : error LNK2001: unresolved external symbol __imp__WSASocketA@24
WSAChatDlg.obj : error LNK2001: unresolved external symbol __imp__gethostbyaddr@12
WSAChatDlg.obj : error LNK2001: unresolved external symbol __imp__WSARecvFrom@36
WSAChatDlg.obj : error LNK2001: unresolved external symbol __imp__WSASendTo@36
WSAChatDlg.obj : error LNK2001: unresolved external symbol __imp__gethostbyname@4
Debug/WSAChat.exe : warning LNK4088: image being generated due to /FORCE option; image may not run
Creating browse info file...

WSAChat.exe - 12 error(s), 2 warning(s)


解决方法:Project->Settings->Link->Object/libary modules:加上ws2_32.lib

相关文章:

  • 2021-08-30
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2018-06-08
  • 2021-09-25
  • 2022-12-23
猜你喜欢
  • 2022-03-06
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案