944,216 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 18196
  • C++ RSS
May 22nd, 2007
0

wsock32.lib

Expand Post »
I am developing a C++ application which deals with socket programming. When I build my program, I get an error as follows,

C++ Syntax (Toggle Plain Text)
  1.  
  2. ------ Build started: Project: AFEClientPublic, Configuration: Debug Win32 ------
  3. Linking...
  4. LINK : fatal error LNK1104: cannot open file 'wsock32.lib'
  5. Build log was saved at "file://d:\AfeClientPublic43\AFEClientPublic43\Debug\BuildLog.htm"
  6. AFEClientPublic - 1 error(s), 0 warning(s)
  7. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I have also downloaded the wsock32.lib from web but I dont know where to place it to make my program run. Kindly guide me furthure.
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Masood Ali is offline Offline
19 posts
since Mar 2007
May 22nd, 2007
0

Re: wsock32.lib

It doesnt matter where you put the wsock32.lib file. Just link it properly with the /link switch of your compiler. From the looks of it, you seem to be using the Visual C++ compiler. I thought the wsock32.lib file came with it by default and you wouldn't have to download it.

Anyway, if you are using the Visual Studio IDE, you can select "Add files to project" and select the wsock32.lib and build. Should work.
Moderator
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
WolfPack is offline Offline
1,559 posts
since Jun 2005
May 22nd, 2007
0

Re: wsock32.lib

if you are using the current version of platform sdk:
header is winsock2.h
import library (link to) ws2_32.lib
shared library (dll) ws2_32.dll
Reputation Points: 1159
Solved Threads: 285
Posting Virtuoso
vijayan121 is offline Offline
1,606 posts
since Dec 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Velocity Progra [Homework Help]
Next Thread in C++ Forum Timeline: last homework :) assign structure???





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC