[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Threads

Posted on 2002-06-18
2
Medium Priority
?
247 Views
Last Modified: 2010-04-15
I am trying to create a new thread of execution by calling :

_beginthread( simulateBMP, 0, NULL );

void simulateBMP() will be the function holding the code for this new thread. However, I got a compilation error when I try to compile my program using Visual C++ 6.0.

Even though, I have included the proper library by calling :

#include <process.h>

I still get the following strange error:

D:\MyProjects\MainBlock.cpp(296) : error C2065: '_beginthread' : undeclared identifier

_beginthread is a function defined in <process.h>. Why am I getting this error????

How can I go around it???

Thanks in advance
0
Comment
Question by:dyma82
[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 4

Accepted Solution

by:
mblat earned 200 total points
ID: 7090216
You need to include multithreaded DLL in your project.  Go to Projects->Settings C++ tab select Code Generation category choose Multithreaded DLL or Debug Multithreaded DLL.


Hope it helps...
0
 
LVL 11

Expert Comment

by:dimitry
ID: 7090953
If you want to insert this function explicitly
add "libcmt.lib" library to project
settings -> link -> object/library modules
0

Featured Post

Independent Software Vendors: 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

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

656 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