粗大メモ置き場

個人用,たまーに来訪者を意識する雑記メモ

When you see the error like " error LNK2001: unresolved external symbol __imp__recv@16 "

When you see the error like below in VS2013,

1>fuga.obj : error LNK2001: unresolved external symbol __imp__WSAStartup@8
1>fuga.obj : error LNK2001: unresolved external symbol __imp__htons@4
1>fuga.obj : error LNK2001: unresolved external symbol __imp__inet_pton@12
1>fuga.obj : error LNK2001: unresolved external symbol __imp__socket@12
1>fuga.obj : error LNK2001: unresolved external symbol __imp__recv@16
1>fuga.obj : error LNK2001: unresolved external symbol __imp__send@16

you may include "WinSock2.h" or "Ws2tcpip.h" or something.

The solution is that.
Open your properties and go to [Linker]->[Input]->[Additional Dependencies]
and add follows:
Ws2_32.lib;

May be this is only for 32bit programs... I hope this article will help your VS2013 life.

f:id:ossyaritoori:20151210223333p:plain


ほしい情報がネットに載ってないって時ありますよね。
この記事が誰かの助けになるといいですね^^(間違ってたら教えてw)