简体   繁体   中英

can not find my lib files to link

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.

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM