server1View.obj : error LNK2001: unresolved external symbol
__imp__listen@8
server1View.obj : error LNK2001: unresolved external symbol __imp__bind@12
server1View.obj : error LNK2001: unresolved external symbol
__imp__socket@12
server1View.obj : error LNK2001: unresolved external symbol __imp__htons@4
server1View.obj : error LNK2001: unresolved external symbol __imp__htonl@4
Debug/server1.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.
Creating browse info file...
server1.exe - 6 error(s), 0 warning(s)
有俩种方法可以解决这个问题
1.在project->setting中,打开link选项卡,加上ws2_32.lib
2.在文件中加上#progmma comment(lib, "ws2_32.lib")