开发者

PATH Environment Variable has no Effect? (VS2010)

From what I can tell from this MSDN walkthrough, the PATH environment variable should point to the location of a DLL when the DLL isn't in the same directory as the source.

I have set this variable through Property Pages > Configuration Properties > VC++ Directories > Executable Directories (which 开发者_StackOverflow社区does correspond to the PATH variable, according to the tooltip).

When I try to compile and run my code, however, I still get "missing DLL" errors. Manually copying the DLL into the source folder solves the problem, but that's not really an option in this case.

What am I missing here?


The PATH directory that the "Executable Directories" page refers to are the directories that are searched for compiling your code, not the directories that are searched at run time to execute your program.

If you don't want to set your path every time in your command prompt, you can update your PATH environment variable for your user session. (My Computer -> Properties -> Advanced -> Environment Variables) You can then either update your system PATH variable or create a local PATH variable for your user account. (Make sure you restart your command prompt after you do this)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜