Thread: cannot find ws2_32.lib for socket programming

  1. #1
    Join Date
    Sep 2003

    cannot find ws2_32.lib for socket programming


    I am doing some socket programming in C that will run on a windows XP professional.

    I am using Visual Studio C++ 2005.

    I have to use the library WS2_32.lib and include the header file winsock32.h.

    However, I am having trouble find the WS2_32.lib on my computer, I have done complete search but cannot find it anywhere.

    I have check this article to see if I am using the right one:;en-us;124876

    Where am I doing wrong,

    Many thanks,


  2. #2
    Registered User
    Join Date
    Sep 2004
    First, the header is winsock2.h, not winsock32.h. As for the missing library, it should be in your visual studio platform sdk folder. If you don't have it, you can always download the platform sdk from Microsoft.
    C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib

  3. #3
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Cambridge, UK
    Download the Platform SDK and run it; follow the installation process. All SDK which is needed for windows programming will be installed on your machine * SDK which you select will be installed *. I usually install all SDK . Here is the link where you can download the installation file.


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. could not find -lwsock32.lib
    By thomas_joyee in forum C++ Programming
    Replies: 8
    Last Post: 07-14-2008, 12:28 PM
  3. How to find O of threads ?
    By jabka in forum C Programming
    Replies: 3
    Last Post: 03-11-2008, 12:25 PM
  4. how do u find 2nd largest number??
    By juancardenas in forum C Programming
    Replies: 8
    Last Post: 02-14-2003, 08:28 AM
  5. Q: Recursion to find all paths of a maze
    By reti in forum C Programming
    Replies: 7
    Last Post: 11-26-2002, 09:28 AM