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

x
?
Solved

'_endthreadex' : undeclared identifier

Posted on 2003-11-19
2
Medium Priority
?
1,099 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 500 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

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

927 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