Solved

Threads

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
libcurl and C++ - Post JSON Data 8 1,199
C language IDE – Compilers installation 14 68
What is sub-make ? 2 40
Resolve Dependency Issues 4 48
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
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…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
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.

863 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

22 Experts available now in Live!

Get 1:1 Help Now