How to link WS2_32.lib?<p>Hello people,</p> <p>could anyone please tell me, how to link that library WS2_32.lib?</p> <p>I try to learn about windows sockets, but I get the LNK2019-Error. I know that I need the library but I don't know how to tell the linker the path to the lib!</p> <p>Thanks in advance</p>© 2009 Microsoft Corporation. All rights reserved.Thu, 19 Jun 2008 00:15:52 Zcfefa4a5-1f1a-4987-8bc7-f3197cb5826chttp://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/cfefa4a5-1f1a-4987-8bc7-f3197cb5826c#cfefa4a5-1f1a-4987-8bc7-f3197cb5826chttp://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/cfefa4a5-1f1a-4987-8bc7-f3197cb5826c#cfefa4a5-1f1a-4987-8bc7-f3197cb5826cDrSchemehttp://social.msdn.microsoft.com/Profile/en-US/?user=DrSchemeHow to link WS2_32.lib?<p>Hello people,</p> <p>could anyone please tell me, how to link that library WS2_32.lib?</p> <p>I try to learn about windows sockets, but I get the LNK2019-Error. I know that I need the library but I don't know how to tell the linker the path to the lib!</p> <p>Thanks in advance</p>Thu, 20 Jul 2006 15:45:33 Z2006-07-20T18:48:24Zhttp://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/cfefa4a5-1f1a-4987-8bc7-f3197cb5826c#fce5fcea-cee7-4289-8dda-957ebe1dcfcfhttp://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/cfefa4a5-1f1a-4987-8bc7-f3197cb5826c#fce5fcea-cee7-4289-8dda-957ebe1dcfcfTed_http://social.msdn.microsoft.com/Profile/en-US/?user=Ted_How to link WS2_32.lib?<p>Are you talking about Visual C++ 2005? Then the necessary library files will already be installed on your machine and you simply need to specify ws2_32.lib as a library in </p> <p>Configuration properties - Linker - Input - Additional Dependencies.</p>Thu, 20 Jul 2006 17:10:33 Z2006-07-20T18:48:24Zhttp://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/cfefa4a5-1f1a-4987-8bc7-f3197cb5826c#40cda7c7-15a9-4d2f-a79b-6cb22833bad8http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/cfefa4a5-1f1a-4987-8bc7-f3197cb5826c#40cda7c7-15a9-4d2f-a79b-6cb22833bad8anc3shttp://social.msdn.microsoft.com/Profile/en-US/?user=anc3sHow to link WS2_32.lib?<p align=left><font face=Arial size=2>To link from dos command prompt like me just add the option swith &quot;/link C:\MyVisualStudio\VCxx\Lib\WS2_32.LIB&quot; . There are no macro function like /MD which is used for linking MSVCRT.LIB so you have type it out with your location path. Type CL /? for further help.</font></p> <p align=left>Hope this helps...</p>Thu, 13 Dec 2007 17:21:01 Z2007-12-13T17:21:01Zhttp://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/cfefa4a5-1f1a-4987-8bc7-f3197cb5826c#42ef9599-4a25-45ff-b9a1-eef0a3ae0146http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/cfefa4a5-1f1a-4987-8bc7-f3197cb5826c#42ef9599-4a25-45ff-b9a1-eef0a3ae0146Pintu Shuklahttp://social.msdn.microsoft.com/Profile/en-US/?user=Pintu%20ShuklaHow to link WS2_32.lib?<font size=2><span style="font-family:Courier">You also can use in the Following way.</span><br style="font-family:Courier"><span style="color:rgb(0,0,255);font-family:Courier">#pragma comment(lib, &quot;ws2_32.lib&quot;)<br><br>Thanx<br></span></font>Thu, 13 Dec 2007 17:27:16 Z2007-12-13T17:27:16Z