使用Visual Studio 11 RC调试时找不到DLL依赖 [英] DLL dependency not found when debugging with Visual Studio 11 RC
问题描述
我的项目是一个独立的C ++应用程序,使用FMOD播放声音。我以前开发了与Visual Studio 2010相同的项目没有任何问题,但2012给我的经典错误:该程序无法启动,因为fmodex.dll从您的计算机丢失。请尝试重新安装程序来解决这个问题。 。该项目似乎加载其他DLL(如Direct3d相关文件和d3d着色器编译器)只是很好。
My project is a standalone C++ application that uses FMOD for playing sound. I've previously developed the same project with Visual Studio 2010 without any problems, but 2012 gives me the classic error: "The program can't start because fmodex.dll is missing from your computer. Try reinstalling the program to fix this problem." The project seems to load other DLLs(such as Direct3d related files and d3d shader compiler) just fine.
只有当试图调试或运行程序从IDE,如果我将可执行文件复制到DLL的相应目录,并手动运行它。如果我从程序中删除所有对FMOD的引用,调试和运行工作正常。我确保我有正确的工作目录在项目设置(除了它加载所有其他文件正好在同一目录)。我最初是从Visual Studio 2010转换项目,但试图从头开始创建一个新项目没有运气。我也修改了所有可能的编译器和链接器设置,并且谷歌搜索似乎也没有帮助。
The problem occurs only if trying to debug or run the program from the IDE, not if I copy the executable to the appropriate directory with DLL and run it manually. If I remove all references to FMOD from the program, the debugging and running works fine. I've made sure that I have correct working directory in Project settings (besides it loads all the other files just fine in the same directory). I originally converted the project from Visual Studio 2010, but tried to create a new project from scratch with no luck. I've also tinkered all the possible compiler and linker settings through, and googling doesn't seem to help either.
我猜这个问题与新的Metro风格的应用程序有关,它是处理外部依赖的方式,但我也转向了Metro Style App Support 关闭。我开始想,我真的尝试了一切,我可以,不知道接下来要做什么。获取更多的诊断信息的方向也将非常赞赏!感谢!
I'm guessing that the problem has something to do with the new Metro style apps and it's way to handle external dependecies, but I have also turned "Metro Style App Support" off. I'm starting to think I've really tried everything I can and have no idea what to try next. Directions for getting more diagnostic information would be much appreciated as well! Thanks!
编辑:我使用的Visual Studio版本是Visual Studio Ultimate 2012 RC,版本11.0.50706.0 QRELRC 2012年7月
Visual Studio version I'm using is Visual Studio Ultimate 2012 RC, Version 11.0.50706.0 QRELRC July, 2012
推荐答案
转到项目的属性:
Configuration Properties | Debugging | Environment
并添加以下项目:
PATH=c:\path\where\the\dll-is;$(Path)
这篇关于使用Visual Studio 11 RC调试时找不到DLL依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!