At debugging the code, the program gives 2 errors

Error 1 error LNK2001: unresolved external symbol _mainCRTStartup

Error 2 error LNK1120: 1 unresolved externals

Recommended Answers

Did you code a main() function?

Jump to Post

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

Jump to Post

Please read this thread and see if it helps you.

Jump to Post

All 11 Replies

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 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.