Thread: Proramming with winsock

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    4

    Proramming with winsock

    Hey everybody, Ive read some tutorials about winsock library, but my codes doesnt work, there are many errors about the "include <winsock.h>", so do I need download this library for dev c++? where can I download?

    Thank you!

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by WolfBend View Post
    Hey everybody, Ive read some tutorials about winsock library, but my codes doesnt work, there are many errors about the "include <winsock.h>", so do I need download this library for dev c++? where can I download?

    Thank you!
    your tutorial is slightly outdated.

    I would suggest for each function you are using go to msdn and check which header and lib it requires...

    for example gethostbyname Function (Windows)

    requires include file Winsock2.h
    library (for linkage) Ws2_32.lib
    and dll (for run) Ws2_32.dll

    all this could be found in the requirements section of the page
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Master n00b Matty_Alan's Avatar
    Join Date
    Jun 2007
    Location
    Bloody Australia Mate!
    Posts
    96
    if the above dosn't fix, it try including ws2tcpip.h

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Winsock issues
    By tjpanda in forum Windows Programming
    Replies: 3
    Last Post: 12-04-2008, 08:32 AM
  2. Winsock Messaging Program
    By Morgul in forum Windows Programming
    Replies: 13
    Last Post: 04-25-2005, 04:00 PM
  3. Where do I initialize Winsock and catch messages for it?
    By Lithorien in forum Windows Programming
    Replies: 10
    Last Post: 12-30-2004, 12:11 PM
  4. Winsock Problem
    By Noxir in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2004, 10:50 AM
  5. winsock
    By pode in forum Networking/Device Communication
    Replies: 2
    Last Post: 09-26-2003, 12:45 AM