尝试从书中编译练习代码时出现以下错误。
// This program prints a message with your name in it.
#include <iostream>
using namespace std;
int main()
{
cout << "Hi! It\'s me.\n";
cout << "I\'m learning to program!\n";
return 0;
}
我收到以下错误:
1>------ Build started: Project: TestCompiler, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
当我禁用增量链接和嵌入清单时,我得到以下内容,无法在没有调试的情况下启动。
'TestCompiler.exe': Loaded 'C:\Users\user\Documents\Visual Studio 2010\Projects\TestCompiler\Debug\TestCompiler.exe', Symbols loaded.
'TestCompiler.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Symbols loaded (source information stripped).
'TestCompiler.exe': Loaded 'C:\Program Files\AVAST Software\Avast\snxhk.dll', Cannot find or open the PDB file
'TestCompiler.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Symbols loaded (source information stripped).
'TestCompiler.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Symbols loaded (source information stripped).
'TestCompiler.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'TestCompiler.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
The program '[3824] TestCompiler.exe: Native' has exited with code 0 (0x0).