views:

34

answers:

2

I am trying to find a lib file that I created. I changed the configuration type to static lib. Then I rebuild the application. When I go to the debug folder in windows, I see the .lib file. but when I create a new application and try to add it to "additional Library Directories" I go to the exact folder and it does not show up.

+1  A: 

The AdditionalLibraryDirectories setting is for, well, directories. You add the directory the lib is in there, and add the lib's name to AdditionalDependencies

Michael Mrozek
Silly me! lol. Why does have to it twice ?? Or is that necessary. Is one just for including a batch and one for including a single file ??
numerical25
For additional dependencies, all I see is a yes and a no. am i looking in the wrong place
numerical25
Damn it, are you kidding?
Kotti
how do link the directory to my header files that go with my libs
numerical25
You have `Additional Include Directories`, `Additional Library Directories` and `Library Dependencies`. First come for (simply speaking) .h files, that come with library (generally speaking, those declare library interface). Second are used to specify folders where your library will be searched for. And third setting says to your compiler `Please, link that, that and that library to my project, because they contain some useful stuff that I will probably need`.
Kotti
ok, thanks for your help
numerical25
+2  A: 

You should use Project - Linker - Input - Additional Dependencies to add your created library. So, the directories is not what you want to change.

There are 2 simple ways to include that lib in your new project.

First one - just copy this lib to your new projects folder and add it's name at the Additional Dependencies input field.

The second - add a new project to the same solution and set it's dependency to your first project. This way your library will be linked automatically.

Kotti