Solved

'_endthreadex' : undeclared identifier

Posted on 2003-11-19
2
1,060 Views
Last Modified: 2013-12-03
I have to admit that I'm still very new to multithreading in C++ but I got this code running without the merest error on Dev-Cpp so it must work on VC++ too.
Well I have a Thread class that I found somewhere on the net. But when I try to compile the code I get the following error (only the part wich is interesting):

Thread.hpp(180) : error C2065: '_beginthreadex' : undeclared identifier
xlocale(467) : while compiling class-template member function 'bool __thiscall Thread::TThread<class Socket>::Start(void)'
Thread.cpp(21) : error C2065: '_beginthreadex' : undeclared identifier
Thread.cpp(98) : error C2065: '_endthreadex' : undeclared identifier

I know that these 3 functions are defined in process.h and inside the class I included them too but it doesn't work.

Hope you can help me

Snyke
0
Comment
Question by:Snyke
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 125 total points
ID: 9780958
You need to set the appropriate runtime library. Go to the project settings, choose the C++ tab and pick "Code Generation" from the ComboBox. Then, set "Use Runtime Library" to the appropriate multithreaded version, I'd recommend 'Multithreaded DLL'.
0
 
LVL 1

Author Comment

by:Snyke
ID: 9781033
Thank you very much. That was fast :)
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now