Link to home
Start Free TrialLog in
Avatar of John500
John500Flag for United States of America

asked on

LINKER Problem - LNK2001 unresolved external symbol _endthreadex

Greetings:

I'm trying to compile a program and the 3 linker errors I get are:

Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex

Any clues here?
ASKER CERTIFIED SOLUTION
Avatar of nietod
nietod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jkr
See http://support.microsoft.com/support/kb/articles/Q126/6/46.asp ('PRB: Error Msg: LNK2001 on __beginthreadex and __endthreadex')
Avatar of nietod
nietod

to link ot the right run-time library,

Go to the "Project" menu
"Project settings" menu option
Then in the dialog that appears go to the "C/C++' tab.
In the "category" list, go to "code generation"

Then you want change the "Use run-time library" list option to one of the multi-threaded options.

Note that you need to do this with both the debug and the release versions.  this is controlled by highlighting one version or the other in the list on the left.   Be sure to choose the debug libraries when settting it for a debug version and the release libraries when you set it for a release version.

Note that EE's E-mail notification is not working.  If you post a comment, I will not be notified about it--at this time anyways.  But you can e-mail me at nietod@journey. to notify me directly.
Ooops...
Avatar of John500

ASKER

nietod,

That was the ticket.  Glad to see you are still out here on EE.

I should have known this was the answer because I asked this questin once before and you answered it.  It was actually the first place I looked, however, I was ensuring that it was set to 'single' instead of 'multiple'.

Thanks again!