Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add a lib file to link in Visual C++ 2010?

I've found the Additional Dependencies thing on Visual C++ 2010, but I can't seem to find any option of adding new .lib files when I go to . I need to add wsock32.lib to link with my file, how do I make it happen?

Thanks!

like image 702
Zakum Avatar asked Jun 01 '12 08:06

Zakum


People also ask

How do I add an external library to Visual Studio?

For adding libraries, this is very simple (if that's what you mean) Project -> properties -> configure properties -> Linker -> Input -> additional libraries. Go stand on one of the libraries in there and press enter.

What is .LIB file in Visual Studio?

The Microsoft Library Manager (LIB.exe) creates and manages a library of Common Object File Format (COFF) object files. LIB can also be used to create export files and import libraries to reference exported definitions. You can start this tool only from the Visual Studio command prompt.


1 Answers

Add the wsock32.lib in the text field.

 Project Properties -> Linker -> Input -> Additional Dependencies. 

When you click in the field, you get a ... button. Click on this button and add one library name per line. Alternatively you can write the names in the field. Separate all entries with space characters.

You can verify that it's on the command line in

 Project Properties -> Linker -> Command Line. 
like image 102
harper Avatar answered Sep 21 '22 14:09

harper