Visual C++ 2010 problem

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