Skip to content

what means error LNK2019: unresolved external symbol _bind@

December 26, 2007

compiling my C code in visual studio I had the folowing errors

error LNK2019: unresolved external symbol _listen@8 referenced in function X
error LNK2019: unresolved external symbol _bind@12 referenced in function Y
error LNK2019: unresolved external symbol _setsockopt@20 referenced in function X
error LNK2019: unresolved external symbol _WSAGetLastError@0 referenced in function X
error LNK2019: unresolved external symbol _socket@12 referenced in function X

To solve this I added a new dependencie in my project in properties -> linker -> Input -> Additional Dependencies and I added ws2_32.lib, in this library are things related to windows sockets.

Advertisement

From → C, visual studio

2 Comments
  1. mario permalink

    i also had this error number.
    i was writing some C code snippets, but i was trying to compile it without a main(){}. my bad.

  2. javad permalink

    add in source cod this command
    #pragma comment(lib, “ws2_32.lib”)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.