Visual Studio 2012. "unable to start program" *.exe "cannot find the file specified"
Visual Studio 2012. "unable to start program" *.exe "cannot find the file specified"
是的,我知道这是一个常见的问题。没有其他问题/答案集满足我在这里的需求。本季度以 c++ 为例。一直很好。尝试执行最后一项作业,我收到上述错误,即使在一个新项目中也是如此:
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
cout << "hello world" << endl;
}
作为实验,我尝试粘贴以前作业中更复杂的代码。这将运行。只是粘贴 - 而不是运行上一个作业。
我选择了其中最简单的一个,并将其剥离为:
主.cpp:
#include <iostream>
using namespace std;
int main()
{
double hours, rate;
cout << "Hello World";
cin >> hours;
cout << "Hello World";
cin >> rate;
system("pause");
return 0;
}
这样可以编译并运行良好。但是,如果我删除cin
行中的任何一行,则会出现标题中指出的错误。
我只是大吃一惊,因为粘贴在代码中可以编译和运行,但即使是新项目中的"Hello World"也不会。
我上面的例子提供了任何线索吗?
如果您以管理员身份运行它,它会发生吗?您是从Visual Studio运行它还是单击了可执行文件?
如果您有防病毒软件,它也可能导致错误。
相关文章:
- 为cl.exe(Visual Studio代码)指定命令行C++版本
- 终端不会为C++文件创建.exe文件吗
- 在Windows中以.exe的形式运行c++
- Visual Studio mkl_link_tool.exe链接错误
- PrintWindow函数在notepad.exe中出错
- 赛通"Cannot take address of memoryview slice"
- VSCode C++ 编译的exe感染了Win32:TrojanX-gen[Trj]
- 将返回值从 exe 传递到 bat,并将其传递给 C# 中的进程
- 'Cannot output file filename.exe Permission denied' C++ 代码::块中的错误
- mingw-w64 ... ld.exe: cannot find -lboost_filesystem
- Sysgcc: ld.exe cannot find -lcurl -ljsoncpp
- 如何修复链接器错误"mingw32/bin/ld.exe: cannot find -lSDL"?
- 如何在C++中调试"cannot open output file allocating memory.exe: Permission denied"?
- ld.exe cannot find -lGL
- ld.exe: cannot find -lstrmbase
- /Mingw32/bin/ld.exe: cannot find -llibcurl?
- Visual Studio 2012. "unable to start program" *.exe "cannot find the file specified"
- ld.exe: cannot find -lopencv_createsamples.exe
- 链接到 exe 错误"cannot read at 0x300"的库和 DLL
- "cannot open output file filename.exe: Permission denied"