c socket 通信

错误
Linking...
client.obj : error LNK2001: unresolved external symbol _send@16
client.obj : error LNK2001: unresolved external symbol _connect@12
client.obj : error LNK2001: unresolved external symbol _htons@4
client.obj : error LNK2001: unresolved external symbol _closesocket@4
client.obj : error LNK2001: unresolved external symbol _gethostbyname@4
client.obj : error LNK2001: unresolved external symbol _WSAGetLastError@0
client.obj : error LNK2001: unresolved external symbol _socket@12
client.obj : error LNK2001: unresolved external symbol _WSACleanup@0
client.obj : error LNK2001: unresolved external symbol _shutdown@8
client.obj : error LNK2001: unresolved external symbol _recv@16

解决办法:
加上这个:
#pragma comment(lib,"WS2_32.lib")

错误:
client.obj : error LNK2001: unresolved external symbol __beginthread

解决办法:

在project-》setting-》c/c++ :分类选code generation ,选多线程

你可能感兴趣的:(多线程,C++,c,socket,C#)