Solved

Threads

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
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…
The goal of this video is to provide viewers with basic examples to understand and use pointers 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.

744 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

13 Experts available now in Live!

Get 1:1 Help Now