Code::Blocks Forums

User forums => Help => Topic started by: maartenl on April 23, 2006, 02:17:34 pm

Title: MSVCT7.0: trying to use winsock2, LNK2019:unresolved external symbols
Post by: maartenl on April 23, 2006, 02:17:34 pm
Hello,

Busy with Codeblocks and works fine, except I'm trying a client-socket program with Winsock2. I'm getting 10 unresolved external symbols.

error LNK2019: unresolved external symbol __imp__send@16 referenced in function _main

As far as I can tell I've got all necessary files in necessary directories:
inc: winsock2.h
lib: WS2_32.Lib
DLL: windows/system32/ws2_32.dll

I'm guessing it cannot find the ws2_32.dll file? Where in Codeblocks should I tell codeblocks to look for it?

Regards,
Title: Re: MSVCT7.0: trying to use winsock2, LNK2019:unresolved external symbols
Post by: Liu on May 08, 2006, 10:44:29 am
I think that cl need a corresponding .lib file,
but I'm not able to set my include/lib directory,
and not able to set specific .lib file which cl link it.
Title: Re: MSVCT7.0: trying to use winsock2, LNK2019:unresolved external symbols
Post by: PChris on May 08, 2006, 01:35:53 pm
Which compiler do you use?

You should tell the linker, that it should link the*.lib file
Title: Re: MSVCT7.0: trying to use winsock2, LNK2019:unresolved external symbols
Post by: Liu on May 09, 2006, 01:05:53 pm
Thanks! I found it, ambiguous rule.
compiler directory == include directory and linker directory == lib directory