Winsock.DLL
Hi all!
I am using the Winsock.dll functions for communication software with MSVC++ V6, but I am getting the linker error like that:
1. err.obj : error LNK2001: unresolved external symbol _WSASetLastError@4
2. sock.obj : error LNK2001: unresolved external symbol __imp__ntohs@4
and etc.
it means the linker don't find the winsock.DLL file. my question is how I can tell the linker to link the Winsock.DLL, which I know excatly where is located ?
[482 byte] By [
nivrobin] at [2007-11-11 10:06:26]

# 2 Re: Winsock.DLL
if it's in the <systemdir> or in the <library files dir for your vc> or the same dir as the source programme , u don't need to link to it as the linker search in those dirs first ...
otherwise u can manage this from :
project>>settings (ALT+F7) >>link > customize
Amahdy at 2007-11-11 21:00:27 >

# 3 Re: Winsock.DLL
I think in Windows 95 and later the correct library is actually called "Ws2_32.lib".
You can specify it in Projects settings (Link --> Category: Input --> Object/library modules), or in one of your source file:
#pragma comment(lib, "Ws2_32.lib")
I hope this helps.
Viorel at 2007-11-11 21:01:33 >

# 10 Re: Winsock.DLL
Usually I use vc6 but sometimes I refer to the installed .net 2003 and rarely I need to install the .net 2005 and no one of them contains the .lib file , anyway I prefer to use the winsock.ocx coz it's easiest to use at coding time , but at final compilation sometimes I refer to the dll with small changes in the source programme .
Amahdy at 2007-11-11 21:08:37 >
