C++ MFC

Make sure:

#include "stdafx.h"

comes FIRST otherwise you will get lots of proper errors.

If you see the following error:

error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup

Make sure that your linker is set to compile for windows:

Project > Properties > Linker > System > SubSystem
set to
Windows (/SUBSYSTEM:WINDOWS)

Another key hint is to set your

Project > Properties > Configuration Properties > General > Use of MFC

set to:

Use MFC in a Shared DLL

Leave a Reply