Visual C++ 2010 error. The system cannot find the file specified

天大地大妈咪最大 提交于 2019-12-08 04:50:50

问题


I am trying to run a sample tutorial on Visual C++ 2010 but it keeps giving me this error:

Unable to start program C:\Users\SVS\Documents\Visual Studio 2010\Projects\3DTrialOne\Debug\3DTrialOne.exe 
The system cannot find the file specified.

I have created a new project and added the source code into the new one. I have created a new project from existing code too. It still has the same error. Should I change anything in the configuration settings?

I have tried to point the working path in the configuration settings to the debug folder (just shooting blindly), but it still has the same error.

EDIT 2: Someone had the same problem with Visual Studio and posted this, Having trouble with MS Visual Studio 2010 in OpenGL.org. Anyone know what this means?


回答1:


The error indicates you're trying to run an exe file which isn't on the machine. (or at least not at the path specified)

Try compiling the project. If there are build errors, post those.

If you're able to compile the project ok; then there's a problem with where VS thinks the executable to launch is. ( Try looking under settings, output directory )




回答2:


For me, my antivirus software was conflicting with the process of creating the exe, so before I opened visual studio, I would disable my antivirus. Then I would create a new project because otherwise the exe for that project would already be removed by antivirus. But if your worrying about having to start a new project each time, you don't have to. But just do it for the projects that the issue has already arisen in. Make sure to disable your antivirus each time, and THEN open visual studio.

Sorry if I am of no help, but this solved my issue.




回答3:


The best way is to change "\" to "/", it solved my issue and I caught at while I looked toward the warning.



来源:https://stackoverflow.com/questions/6590482/visual-c-2010-error-the-system-cannot-find-the-file-specified

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!