Adding library files to a project

Tuskony

Newcomer
Joined
Jun 20, 2003
Messages
2
I'm reading through a Winsock book for C++ and it says that in order to use winsock2 I need to reference the ws2_32.lib library file. How do I do this with the .Net compiler?

"When compiling your application with WINSOCK2.H, you should link with WS2_32.LIB library"

That's what my book says.


Thanks in advance.
 
Are you using C++ from within the Visual Studio IDE? If so right click on the project and go to properties, under linker advanced there should be an entry for Import Library. Type WS2_32.Lib into the field.
 
Are you using C++? If you're using C++ I'd imagine you link it like you would any other C++ project. If you're using .NET I believe there's a class library in the .NET framework that encapsulates winsock functionality. If not try the import attribute.
 
PlausiblyDamp > Umm, I don't see the Linker option? I'm using the Visual Studio .Net compiler if that makes any difference?

And yes I'm using C++.
 
It should be there like PlausiblyDamp said, right click your project, select properties, on the left there is a treeview with options, there should be one that Configuration Properties, expand that, and then expand one that says linker, then click on Advanced on the expanded list. And there should be an Import Library option on the right.
 
Back
Top