Solved

Threads

Posted on 2002-06-18
2
236 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 50 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

Industry Leaders: 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

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

762 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