Visual C++ 2010 problem

Mar 30, 2013 at 4:58pm
I have installed Microsoft Visual C++ 2010 Express in my PC.
When I execute the following code:
1
2
3
4
5
6
7
#include<iostream>
using namespace std;
void main(void)
{ 
	cout<<"\nHello World!"<<std::endl;
	cin.get();	
}


I get the following errors:
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 ==========


I created a new project, then a win32 console app and then wrote the program.

But the code is correct and worked on other compilers. Can anyone please tell me what's wrong? Thank you.
Last edited on Mar 30, 2013 at 5:02pm
Mar 30, 2013 at 5:06pm
Either disable incremental linking, by going to
Project Properties
-> Configuration Properties
-> Linker (General)
-> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"

or install VS2010 SP1.
Topic archived. No new replies allowed.