Solved

Linking Error in vc++ Application

Posted on 2004-10-20
5
283 Views
Last Modified: 2012-06-21
I m working on vc++ application.
When I build the application in debug Mode it builds successfully.
But when I build it in Release Mode it gives the Errors


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


What is the soulution for the above Error
Is there any setting reqd?

leork
0
Comment
Question by:leork2004
5 Comments
 
LVL 13

Accepted Solution

by:
SteH earned 500 total points
ID: 12356275
You need to choose to use a multithreaded library:
Project->Settings
 C/C++ Tab->Code genration
Select either Multithreaded or Multithreaded DLL (Debug xxx if using a debug config).
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 12361198
>>> When I build the application ...
>>> ... But when I build it in Release Mode

That means, your application has "Single-Threaded" settings for "Release - Configuration" but you need "Multi-Threaded" settings. Only with "Multi-Threaded" switch, your project is linked against the appropriate libraries that include the modules 'endthreadex' and 'beginthreadex'.

When opening Settings Dialog, choose "Release Configuration" in the top-left combo box - if not already selected. Then - as STeH already told you - it's the 'C++' tab, Category 'Code Generation' and 'Use run-time library' combobox, where you have to choose 'Multi-Threaded'.

Regards, Alex
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
FMX StringGrid1->Canvas->FillRect Problem 3 177
convert char array to number in c 5 86
computer science syllabus 3 91
C++ Code Issue 4 26
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…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

820 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