Hi all,

I'm reading "Intro to MFC Programming with VC++" (written in the VS 6.0 days)
and am stuck with a link error in a "hello world" type program:

msvcrtd.lib(crtexe.obj) : error LNK2019: unresolved external symbol
_main referenced in function _mainCRTStartup
Debug/Hello World 1.exe : fatal error LNK1120: 1 unresolved externals

I had typed the program by hand. Out of curiosity, I copied the program off
the accompanying CD. After VS .NET converted the project from the older VS
6.0 format, it compiled/linked fine!

One by one, I replaced my hand written files with the files that came on the
CD, but I still got the unresolved reference to _main.

I'm assuming there must be a project setting that got set correctly when VS
converted the older project to the current format, but which did not get set
correctly when I typed the program by hand.

Does anyone have any ideas what project setting would prevent main from being

Secondly, I don't see main() anywhere. There is a global variable:

CMyWinApp MyApplication;

which is derived from CWinApp. I assume when the global variable's
constructor runs, it calls InitInstance() which calls my CMainFrame class.
The CMainFrame class is derived from CFrameWnd. Is main() essentially called
when CMainFrame's constructor calls the Create() function?

And lastly, what is the difference between a "project" and a "solution"?
I've been using VS 6.0 up until a week ago or so, and have never heard of a
"solution" before.

Thank you!