Found the reason for the problem in somebody else post:
link text
The reason the linker is looking for wmain, is because the C++ code is referencing __argv[].
__argv[] is the method console apps use to determine the command line arguments. For some reason, just by referencing this variable, the linker wants to start with wmain, which will allow that variable to be filled in. By commenting out the reference to __argv[], the linker no longer is looking for wmain, and starts with WinMain as expected.
What a bizarre error, and very difficult to find. This seems to be unique to CE, as this is not the behavior for Win32.
I solved it in qcoreapplication.cpp by excluding the code that references __argv
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
// Check whether the command line arguments match those passed to main()
// by comparing to the global __argv/__argc (MS extension).
// Deep comparison is required since argv/argc is rebuilt by WinMain for
// GUI apps or when using MinGW due to its globbing.
static inline bool isArgvModified(int argc, char **argv)
{
#if (!defined(Q_OS_WINCE) || _WIN32_WCE>0x600)
if (__argc != argc || !__argv /* wmain() */)
return true;
if (__argv == argv)
return false;
for (int a = 0; a < argc; ++a) {
if (argv[a] != __argv[a] && strcmp(argv[a], __argv[a]))
return true;
}
#endif
return false;
}