Newbie at work...(about linking)

Hi. I’m a new SDL user but, very rare, everything seems to go very well
either with W32 + VC++6.0 and on Linux except for the following linking

error on w32:

Linking…
main.obj : error LNK2001: unresolved external symbol __imp__recvfrom at 24
main.obj : error LNK2001: unresolved external symbol __imp__connect at 12
Debug/BoAT2.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

It obviously appeared as I tried to add network services to my
application that previously (only using the SDL library) was working
fine.
Trying to guess, in my opinion something is wrong in my include files,
but 'til now I’ve not been able to find what, and I’m wondering if it’s
possible SDL makes change to the network behaviour of my machine.

Thanks in advance
Emanuele Ferrari

had you import the correct library ?
i wonder, do you write and use your own library ?
it sounds like you forget to qualify a DLL function with
_declspec(dllimport/dellexport)…

error on w32:

Linking…
main.obj : error LNK2001: unresolved external symbol
__imp__recvfrom at 24
main.obj : error LNK2001: unresolved external symbol __imp__connect at 12

Try adding ws2_32.lib to your project linker settings. That is the
Winsock library which is probably what contains connect and recvfrom.


Ben Sizer

----- Original Message -----
From: ferrari@cs.unibo.it (Emanuele Ferrari)
Sent: Tuesday, July 03, 2001 3:34 PM
Subject: [SDL] Newbie at work…(about linking)

Kylotan wrote:> ----- Original Message -----

From: Emanuele Ferrari <@Emanuele_Ferrari>
Sent: Tuesday, July 03, 2001 3:34 PM
Subject: [SDL] Newbie at work…(about linking)

error on w32:

Linking…
main.obj : error LNK2001: unresolved external symbol
__imp__recvfrom at 24
main.obj : error LNK2001: unresolved external symbol __imp__connect at 12

Try adding ws2_32.lib to your project linker settings. That is the
Winsock library which is probably what contains connect and recvfrom.


Ben Sizer

Ok, that’s right, it works! Many thanks!
Emanuele Ferrari