Solved

'_endthreadex' : undeclared identifier

Posted on 2003-11-19
2
1,080 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
[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
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 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