Solved

LINKER Problem - LNK2001 unresolved external symbol _endthreadex

Posted on 2001-07-31
5
656 Views
Last Modified: 2007-11-27
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?
0
Comment
Question by:John500
  • 2
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 50 total points
ID: 6337685
that means you are linking to the single-threaded run-time libraries.  You need to link to either the multi-threaded static link run time libraries or the molti-threaded DLL run-time library.

continues.
0
 
LVL 86

Expert Comment

by:jkr
ID: 6337696
See http://support.microsoft.com/support/kb/articles/Q126/6/46.asp ('PRB: Error Msg: LNK2001 on __beginthreadex and __endthreadex')
0
 
LVL 22

Expert Comment

by:nietod
ID: 6337697
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.
0
 
LVL 86

Expert Comment

by:jkr
ID: 6337700
Ooops...
0
 

Author Comment

by:John500
ID: 6337814
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!

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now