Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linking Winsock

Status
Not open for further replies.

Guest42

Programmer
Nov 9, 2005
28
US
Actually, this is more of a general question, but I'm really new to the C and C++ languages, and since I've only ever really used Java and it's standard libraries, I'm unsure about how to link things in C (or C++, but I'm just using C for now)

Right now, I'm trying to use an example on Winsock, using Dev-CPP editor. I have the winsock.h included, which works fine, but I get a linker error for every winsock function I try to call.

I'm pretty sure I'm supposed to link to wsock32 or ws2_32 libraries, but I don't know how to find them or link them. So can someone tell me how linking works, and how to set it up?

Thanks in advance
 
Er, I don't know... is that anothing libary? I'm guessing these files are .dll or .lib files, but regardless I imagine that if I can link to one library I can link to any library. But, I just don't know how to do it, and that's want I'm curious about.
 
You need to link to wsock32.lib

Find it like this :

dir C:\wsock32.lib /s

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
I know how to find files, but, I still don't know how to link them, which is my point. Find, I found wsock32.lib. Now what?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top