每次我尝试运行该简单代码时,我的 VS 2010 Ultimate 都会崩溃。这包括所有其他程序。它以前工作过,没有任何问题。我也重新安装了它,但还是一样。我在谈论 C++
错误:
Error 1 error LNK1123: failure during conversion to COFF: file invalid or corrupt d:\Users\ADMIN\documents\visual studio 2010\Projects\asasa\asasa\
代码:
#include <iostream>
using namespace std;
void main(){
cout << "Hello World";
}
输出:
'Test.exe': Loaded 'D:\Users\ADMIN\Documents\Visual Studio 2010\Projects\Test\Debug\Test.exe', Symbols loaded.
'Test.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'Test.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'Test.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file'Test.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'Test.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
The program '[7164] Test.exe: Native' has exited with code 0 (0x0).
代码 2:
#include <iostream>
using namespace std;
int main(){
string s;
cout << "Write a bunch of text: ";
getline(cin, s);
cout << "You typed: " << s << endl;
return 0;
}
我还了解到这与 VMWare 有关。 VMWare 会是问题所在吗? https://docs.google.com/file/d/0B2zBo690ggSdNXQ2RXp0ejZ1cGM/edit
最佳答案
我认为您遇到了“增量链接”问题。
在项目的 liker 属性中将增量链接设置为“否”(项目属性 > 配置属性 > 链接器 > 启用增量链接:否)
安装 VS2010 SP1 也可以解决这个问题。
关于c++ - 当我尝试运行简单的 "Hello World"代码时,Visual Studio 2010 崩溃了吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25229029/