Developing TCP/IP Application in Microsoft Visual Studio VC++

This is a discussion on Developing TCP/IP Application in Microsoft Visual Studio VC++ within the Windows Programming forums, part of the Platform Specific Boards category; I'm trying to develop an application as mentioned above. But the compliler is giving errors for winsock function .i.e unresolved ...

  1. #1
    ashu12
    Guest

    Developing TCP/IP Application in Microsoft Visual Studio VC++

    I'm trying to develop an application as mentioned above. But the compliler is giving errors for winsock function .i.e unresolved external WSAStartup(), recv, send, htons, etc. (for all winsock functions). i have included the file Winsock.h in my .cpp file.
    Pl. help

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    If you are using that compiler, then use the most up to date header and lib....

    Add the ws2_32.lib to the library and use winsock2.h

    If you use winsock2.h, you dont need windows.h...

    Best bet, remove includes for windows.h & winsock.h and replace with these 2 lines

    Code:
    #include <winsock2.h>
    #pragma comment(lib,"ws2_32.lib")

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting the matrix question..
    By transgalactic2 in forum C Programming
    Replies: 47
    Last Post: 12-22-2008, 03:17 PM
  2. Avoiding Global variables
    By csonx_p in forum Windows Programming
    Replies: 32
    Last Post: 05-19-2008, 01:17 AM
  3. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  4. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 09:57 AM
  5. Erros in Utility Header File
    By silk.odyssey in forum C++ Programming
    Replies: 4
    Last Post: 12-22-2003, 06:17 AM

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