• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

MFC Errors :: C++

kuphryn

Senior member
Hi.

I am studying MFC from Prosise's book. I read the first three chapters, but have not started implementing any sample until today. Visual C++ output three errors with the "Hello MFC" program.

MFC-Hello error LNK2019: unresolved external symbol __beginthreadex referenced in function "public: int __thiscall CWinThread::CreateThread(unsigned long,unsigned int,struct _SECURITY_ATTRIBUTES *)" (?CreateThread@CWinThread@@QAEHKIPAU_SECURITY_ATTRIBUTES@@@Z)

-----

MFC-Hello error LNK2019: unresolved external symbol __endthreadex referenced in function "void __stdcall AfxEndThread(unsigned int,int)" (?AfxEndThread@@YGXIH@Z)

-----

MFC-Hello fatal error LNK1120: 2 unresolved externals

-----

Does anyone know what those errors are about? I copied *exactly* what Promise wrote in his book.

Thanks,
Kuphryn
 
You're currently building a single-thread app instead of a multithreaded app, so the right libraries are not being included. Go into project settings and change to a multi-threaded app.
 
Thanks!

I right-clicked on the soure filea and changed from single-thread to multi-thread /MD through option.

The code works great now.

Kuphryn
 
Back
Top