MFC Errors :: C++

kuphryn

Senior member
Jan 7, 2001
400
0
0
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
 

juiio

Golden Member
Feb 28, 2000
1,433
4
81
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.
 

kuphryn

Senior member
Jan 7, 2001
400
0
0
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