问题
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
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