At debugging the code, the program gives 2 errors

Error 1 error LNK2001: unresolved external symbol _mainCRTStartup

Error 2 error LNK1120: 1 unresolved externals

Did you code a main() function?

Is this the first console program you have written since installing that compiler? Maybe you have a configuration problem.

it is the first time to use the program on windows 7

int main()
{
return 0;
}

This compiles fine on my system; it must be your setup. Did you definitely make it clear that you wanted to create a console programme and not any kind of windowed programme?

Attached is a HelloWorld program I created. Unzip it on your computer then load the solution and try to compile/link it.

it gave the same error

i found a solution
the problem was that the cpp file is generated in "source files" folder

thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.