Solved

Linking Error in vc++ Application

Posted on 2004-10-20
5
285 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
[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
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
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.

623 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