Assertion in appcore.cpp - why?
Posted on 2012-12-24
My MFC App dies right away when started, due to ASSERT in the CWinApp constrcutor. It dies in the last line of this snippet:
if (lpszAppName != NULL)
m_pszAppName = _tcsdup(lpszAppName);
m_pszAppName = NULL;
// initialize CWinThread state
AFX_MODULE_STATE* pModuleState = _AFX_CMDTARGET_GETSTATE();
AFX_MODULE_THREAD_STATE* pThreadState = pModuleState->m_thread;
ASSERT(AfxGetThread() == NULL);
Now, my exe contains a built in static lib, and that static lib has in it a definition of a CWinApp subclass. My confusion may also be conflated with the fact that I just made the leap from IDE 6.0 up to VS 2010 and I may be doing something wrong with linking in the static library. Can someone point me where to look or give a hint as to what is likely wrong? Thanks.