Saturday 11 November 2017

Error while trying to compile simple C++ code in Visual C++ 2010

I get the following error while trying to compile an
exercise code from a book.



// This
program prints a message with your name in it.
#include

using namespace std;


int
main()
{
cout << "Hi! It\'s me.\n";
cout <<
"I\'m learning to program!\n";
return
0;
}


I get
the following
error:




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
==========


And when I
disable incremental linking and embed manifest, I get the following and can't start
without
debugging.



'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).

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...