VS10 Additional library directories fails when using a relative path

早过忘川 提交于 2020-01-03 17:34:12

问题


When I set up my project with relative paths, it fails.

// Does not work properties-linker-general-additional library directories

..\..\libraries

// works fine

C:\Users\NAME\Desktop\project\libraries

How do I get the relative paths to work?


回答1:


Try making it relative to your project directory or solution directory (as appropriate). I avoid playing guessing games with my current directory. Use the convenient variables defined by Visual Studio to avoid hard coding a path.

$(ProjectDir)\..\..\libraries 

or

$(SolutionDir)\..\..\libraries


来源:https://stackoverflow.com/questions/7537261/vs10-additional-library-directories-fails-when-using-a-relative-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!