Solved

LINKER Problem - LNK2001 unresolved external symbol _endthreadex

Posted on 2001-07-31
5
679 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Prototype for MessageDlg in Embacadero XE 2 2 37
how to understand recursion 12 226
IdTCPClient1->Disconnect(); not working 3 66
Header of docx file 17 102
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

785 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