为什么我的项目无法调试?
我刚刚下载了 Microsoft Visual C++,并尝试运行一个简单的 hello world。但是,当我进行调试时,出现错误“无法启动程序 'C:\Users\Sterling\Documents\Visual Studio2010\Projects\test\Debug\test.dll'”
就是这样。它没有说为什么它无法启动它......它只是说它不能。有人经历过这个吗?并知道答案吗?我正在考虑重新安装它,但希望首先找到一个简单的解决方案。我需要一个单独的程序来启动 .dll 文件吗?我大约一周前刚拿到这台笔记本电脑,所以我可能还没有。这是在 Windows 7 上。感谢您的帮助。
I just downloaded Microsoft Visual C++ and am trying to run a simple hello world. However, when I go to debug, I get the error "Unable to start program 'C:\Users\Sterling\Documents\Visual Studio2010\Projects\test\Debug\test.dll'"
And thats it. It doesn't say WHY it can't start it...it just says it can't. Has anyone experienced this? And know an answer? I'm thinking about just reinstalling it, but was hoping to find an easy solution first. Is there a separate program I need to start .dll files? I just got this laptop about a week ago so I may not have it yet. This is on Windows 7. Thank you for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您已将项目构建为 DLL。您不能独立运行 DLL。如果您打算将其构建为程序 (.EXE),请更改项目设置。
在解决方案资源管理器中右键单击项目,单击属性 - 编辑配置属性 ->一般->配置类型为“应用程序(.exe)”。
如果您想将项目构建(并运行)为 DLL,则还必须编写一个使用它的程序来测试它。您可以在与现有 DLL 相同的解决方案中将其作为单独的“TestDll”EXe 项目来执行。
You have built your project as a DLL. You cannot run DLLs standalone. If you meant to build it as a program (.EXE), change the Project Settings.
Right click Project in Solution Explorer, click Properties - edit Configuration Properties -> General -> Configuration Type to be "Application (.exe)".
If you want to build (and run) your project as a DLL, you will have to also write a program that uses it in order to to test it. You could do this as a separate 'TestDll' EXe project in the same solution as your existing DLL.