[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Threads

Posted on 2002-06-18
2
Medium Priority
?
249 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 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

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements 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.

873 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