I already have main() but the program said entry point must be define?

I try a Hello World code in visual studio 2010 with following code

#include <iostream>

using namespace std;

int main()
{
cout << "Hello World" << endl;
return 0;
}

So the program said to me 2 warnings and an error:
1>LINK : warning LNK4001: no object files specified; libraries used
1>LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
1>LINK : fatal error LNK1561: entry point must be defined

And it said "Build Failed".

What should I do to fix this problems?
I really need help because I must present this image processing project soon.

Thank you.
Did you create your project as a console application?
Yes, I create with Win32 Console Application and use empty project.
Maybe check the linker settings. Project->Properites->Linker. Under the advanced section, you can see stuff like the /MACHINE and entry point. By default, I don't think the entry point has to contain anything, but machine should be populated.
Topic archived. No new replies allowed.