Visual Studio debugger error: Unable to start program Specified file cannot be found(Visual Studio 调试器错误:无法启动程序找不到指定的文件)
问题描述
我在 C:full path hereVS2010lender.sln 中有一个解决方案
此解决方案包含许多项目(大约 100 个).当我编译它们时,它们都可以正常工作.我可以毫无问题地运行它们,并且(相当)一切正常(有一些错误).其中一个项目是 ALL_BUILD,但如果我尝试调试 INSTALL(另一个项目),它会给出相同的错误.我正在使用 RELWithDebInfo 作为配置进行编译,如果我手动执行该程序,它就可以工作.输出在C:full path hereVS2010inRelWithDebInfo
但是如果我尝试运行编译器,它会说
<块引用>"无法启动程序C:这里的完整路径VS2010RelWithDebInfoALL_BUILD找不到指定的文件"
我尝试将编译后的程序复制到 VS 要求的路径中,但它引发了同样的错误.
我该怎么做才能解决这个问题?现在我设置 cmake 来生成一个 mingw 项目,我编译它并用 gdb 调试它,但这确实是一个缓慢且不切实际的工作流程,我想使用 VS 调试器.
我必须说,如果我使用 Debug 作为配置进行编译,程序甚至不会启动.
我在 Win7 64 位上使用 VS2010 Express
(这是一个很大的开源程序,所以我不知道它到底做了什么)
根据我掌握的信息推测,您实际上并不是在编译程序,而是在尝试运行它.也就是说,ALL_BUILD 设置为您的启动项目.(它应该是粗体,与您的解决方案中的其他项目不同)如果您然后尝试运行/调试,您将收到您描述的错误,因为根本没有要运行的内容.
该项目很可能通过 CMAKE 生成并包含在您的 Visual Studio 解决方案中.将任何生成 .exe 的项目设置为启动项目(通过右键单击该项目并选择设置为启动项目"),您很可能将能够从 Visual Studio 中启动这些项目.>
I have a solution in C:full path hereVS2010lender.sln
This solution contains many projects(around 100). When I compile them, they all work fine. I can run them without any problem, and (quite) everything works (there are some bugs). One of the projects is ALL_BUILD, but it gives the same error if I try to debug INSTALL(another project). I'm compiling with RELWithDebInfo as configuration, and if I execute the program manually it works. It is outputted in C:full path hereVS2010inRelWithDebInfo
But if I try to run the compiler, it says
"Unable to start program C:full path hereVS2010RelWithDebInfoALL_BUILD Specified file cannot be found"
I tried to copy the compiled program into the path required by VS, but it raised the same error.
What should I do to solve this? Right now I set up cmake to generate also a mingw project and I compile it and debug it with gdb, but this is a really a slow and impractical workflow, and I would like to use the VS debugger.
I must say that if I compile with Debug as configuration, the program doesn't even start.
I'm using VS2010 Express on Win7 64bit
(This is a big open source program, so I don't know exactly whatever it does)
Guessing from the information I have, you're not actually compiling the program, but trying to run it. That is, ALL_BUILD is set as your startup project. (It should be in a bold font, unlike the other projects in your solution) If you then try to run/debug, you will get the error you describe, because there is simply nothing to run.
The project is most likely generated via CMAKE and included in your Visual Studio solution. Set any of the projects that do generate a .exe as the startup project (by right-clicking on the project and selecting "set as startup project") and you will most likely will be able to start those from within Visual Studio.
这篇关于Visual Studio 调试器错误:无法启动程序找不到指定的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Visual Studio 调试器错误:无法启动程序找不到指定


基础教程推荐
- 在 C++ 中计算滚动/移动平均值 2021-01-01
- 这个宏可以转换成函数吗? 2022-01-01
- C++结构和函数声明。为什么它不能编译? 2022-11-07
- 常量变量在标题中不起作用 2021-01-01
- 如何检查GTK+3.0中的小部件类型? 2022-11-30
- 如何通过C程序打开命令提示符Cmd 2022-12-09
- 我有静态或动态 boost 库吗? 2021-01-01
- 如何在 C++ 中初始化静态常量成员? 2022-01-01
- 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
- 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01