Alex Rivera | Logout

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

Asked 2012-06-01T08:43:11.127
30

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!

Edit
Report

1 Answer

6

Here is a GUI way to add a LIB file to your Visual Studio project in C and C++ Languages (for those of us who like to mouse-around like me). I did this in Visual Studio 2012. But I think it works in previous versions, as well.

  1. Find the LIB or other file you want to add to your project in Windows Explorer. Drag the LIB file from Windows Explorer onto Visual Studio's Solution Explorer, to the project to which you wish to add the LIB file. Now, you will see the file listed in Solution Explorer.

That's it! Just one step! You will not see the file in "Project Properties -> Linker -> Input -> Additional Dependencies." However, it is there hidden in the macro %(AdditionalDependencies).

answered 2012-11-08T03:43:38.493

Your Answer