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.
相关文章