問題描述
我在 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 調試器錯誤:無法啟動程序找不到指定的文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!