Visual Studio working directory

旧街凉风 提交于 2021-02-11 16:47:30

问题


It looks like there are similar question to mine, but they have workarounds that I would rather avoid.

I have a bin folder in my project that contains all the dynamic libraries needed to run the program.

So to let the program find the dll, I have set the Working Directory in

Project Property Pages -> All Configurations 
-> Configuration Properties -> Debugging -> Working Directory

Unfortunately I am greated with an error that the libary has not been found. It looks like VS does not change the working directory before running the program.

Did I miss something or is this a known bug without a fix?


回答1:


Don't have VS currently available but I usually add all shared libraries to my PATH variable. Just add as environment variable

Project settings for environment variables

I know it's not a direct answer to your question but I hope it helps anyway



来源:https://stackoverflow.com/questions/23458292/visual-studio-working-directory

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