Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

LINKER Problem - LNK2001 unresolved external symbol _endthreadex

Posted on 2001-07-31
5
Medium Priority
?
740 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 200 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

722 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