Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio visualc&x2B+;2012:无法启动程序(尝试调试时删除程序??)_Visual Studio_Visual C++_Visual Studio 2012_Visual C++ 2012 - Fatal编程技术网

Visual studio visualc&x2B+;2012:无法启动程序(尝试调试时删除程序??)

Visual studio visualc&x2B+;2012:无法启动程序(尝试调试时删除程序??),visual-studio,visual-c++,visual-studio-2012,visual-c++-2012,Visual Studio,Visual C++,Visual Studio 2012,Visual C++ 2012,当我尝试调试我的程序时,出现以下错误: Unable to start program 'c:\stuff\TestStuff\Debug\TestStuff.exe'. The system cannot find the file specified. Windows cannot find 'C:\stuff\TestStuff\Debug\TestStuff.exe'. Make sure you typed the name correctly, and then try agai

当我尝试调试我的程序时,出现以下错误:

Unable to start program 'c:\stuff\TestStuff\Debug\TestStuff.exe'.
The system cannot find the file specified. 
Windows cannot find 'C:\stuff\TestStuff\Debug\TestStuff.exe'. Make sure you typed the name correctly, and then try again.
我将正确的项目设置为活动项目,并且它是一个.exe,到目前为止运行良好。如果我只编译,它实际上会在正确的目录中创建TestStuff.exe,但是如果我尝试调试它,它会删除TestStuff.exe并声明它不存在!如果我在不更改源代码的情况下删除调试目录中的所有内容,它会声明所有内容都是最新的,不需要编译。如果我摆弄我的源文件并重新编译,.exe会出现,但当我尝试调试时,VC++当然会删除它

我怎么能逃脱呢

我尝试重命名.suo文件,但没有任何效果,而且除了.sln本身之外,似乎没有其他文件可以处理。。。重新启动VC++也无济于事:(

编辑:发布版本从IDE运行,而不是调试版本。这与有用版本完全相反

编辑2:如果手动运行debug TestStuff.exe,则会出现以下错误:

Unable to start program 'c:\stuff\TestStuff\Debug\TestStuff.exe'.
The system cannot find the file specified. 
Windows cannot find 'C:\stuff\TestStuff\Debug\TestStuff.exe'. Make sure you typed the name correctly, and then try again.

因此,我猜我的程序现在出了严重的问题,不确定它可以编译什么或为什么不能运行。此外,它删除了自己:(

这是由于将
#include
从头文件移到.cpp文件“更靠近”CImg调用的位置造成的。不过,我不知道为什么。

我今天也遇到了同样的问题。 为了修复它,我停止了我的反病毒(Avast):它似乎认为我的程序是一个可疑的exe