Winsock Question

This is a discussion on Winsock Question within the Windows Programming forums, part of the Platform Specific Boards category; Does anyone here have a copy of the file "winsock32.lib" or a link to a site that does? I have ...

  1. #1
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699

    Winsock Question

    Does anyone here have a copy of the file "winsock32.lib" or a link to a site that does?

    I have searched extensively MSDN, google, altavista, etc - but to no avail...

    My program will not even compile without it, and my compiler's "lib" files do not include this file....
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  2. #2
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802

  3. #3
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    what compiler are you using? It may be possible to build the lib from the dll - you'd still need the header though so Dual-Catfish's 'disclaimer' still holds.

    Alternatively you could get one of the free compilers. Borlands bcc5.5 cmd line tools has a copy (but it's specific to that compiler, although win32 code should compile more or less without too much tweaking). MinGW also as a version (libwsock32.a) - again you'd have to build your app with that compiler.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699
    Actually. I had it, though I didn't know it!

    Here's why: In the Winsock documentation it said I had to link to "wsock32.lib" (in the post I typed it incorrectly). I searched my compiler, but to no avail. Finally, I found that if I added to the "additional compiler instruction" line : " -lwsock32 ", it compiled fine, linking to the file in my lib directory "libwsock32.a", and ran! The compiler is the Bloodshed Dev C/C++ Compiler. The requirements may be the same or similar with different compilers...
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    I had problems with DevC++4 and winsock.....I ended up having to make a slight alteration to the header....and then it worked.....

    I also had to use both winsock libs (1+2) to get it to work......weird...but then you pay your money and you take your chances...

    BTW, various magazines are giving Codewarrior 5 Pro away at the moment and it is a brilliant IDE & Compiler.......loads more than DevC++ (resource editor, MFC Templates, Java compiler as well!!).

    If you have the chance get a magazine with it on ....it will be the best 5 you will ever spend...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. winsock
    By pode in forum Networking/Device Communication
    Replies: 2
    Last Post: 09-26-2003, 12:45 AM
  3. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 08:22 PM
  4. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 02:57 PM
  5. Determining Data Size For Network Send/Rec :: Winsock
    By kuphryn in forum Windows Programming
    Replies: 6
    Last Post: 05-07-2002, 09:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21