Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

Linking Error in vc++ Application

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
leork2004
Asked:
leork2004
1 Solution
 
SteHCommented:
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
 
itsmeandnobodyelseCommented:
>>> 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now