Visual Studio Including Winsock Libraries

This is a discussion on Visual Studio Including Winsock Libraries within the C Programming forums, part of the General Programming Boards category; I'm trying to create a simple winsock client written in C. I'm developing in Visual Studio Express. I cut and ...

  1. #1
    doc
    doc is offline
    Registered User
    Join Date
    Dec 2009
    Posts
    8

    Visual Studio Including Winsock Libraries

    I'm trying to create a simple winsock client written in C. I'm developing in Visual Studio Express.

    I cut and paste a simple sample client and tried to compile but I receive "Unresolved external 'WSAIoctl' referenced from".

    The build is obviously not linking in the ws2_32 library. Can someone tell how can I configure Visual Studio Express to link in this file?

    Secondary question, I want my final exe file to be completely self contained, I don't want dynamic linking of dlls. How can I do this?

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    Project / Properties / Configuration Properties / Linker / Input / Additional Dependencies

    Add the ws2_32.lib to the field above
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    doc
    doc is offline
    Registered User
    Join Date
    Dec 2009
    Posts
    8

    Cool

    Spot on. Thks CSharpener

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  2. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 04:02 AM
  3. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 09:43 AM
  4. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 03:49 AM
  5. Visual Studio .NET beta 2
    By Marky_Mark in forum C++ Programming
    Replies: 1
    Last Post: 11-05-2001, 10:28 AM

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