Solved

thread.h

Posted on 2003-11-22
4
1,372 Views
Last Modified: 2007-12-19
I am beginning a small project that studies the effects of concurrent access to a variable using thread simulations. I am required to use thread.h and tcl.h in the simulaton.

It is my understanding that these are part of the standard library? When I try to include them using #include <thread.h> and #include <tcl.h> I get the following error:

fatal error C1083: Cannot open include file: 'thread.h': No such file or directory

where are these files supposed to be located??
0
Comment
Question by:dmiga
  • 2
  • 2
4 Comments
 
LVL 9

Expert Comment

by:tinchos
ID: 9803103
Hi dmiga,

The problem is the following

When you say

#include <thread.h>
or #include <tcl.h>

you're saying the compiler to include the content of the file thread.h which is located in one of the include directories you have.

The error you're getting is because the compiler is not finding those files, neither thread.h nor tcl.h.

I'm using MSVC++ 6.0 and the don't come with it. Maybe they belong to a different library, in which case you should make the include point to the place where that file is stored.

Hope this helps

Tincho
0
 

Author Comment

by:dmiga
ID: 9803135
I have downloaded the thread files and directed MS C++ 6.0 to the location but can not find where to get the simple tcl library with the tcl_sleep function that I need.

Any Ideas?
0
 
LVL 9

Accepted Solution

by:
tinchos earned 50 total points
ID: 9803160
Sincerely I've no idea where to get it from

In order to avoid the errors you're getting

place the header files in any of the include directories or use the

#include "c:\thread\include\thread.h"

where c:\thread\include is the directory where the thread.h file is stored.

Sorry I cannot help you finding where the tcl library is

TIncho
0
 

Author Comment

by:dmiga
ID: 9803171
Thanks for your reply. I do appreciate it!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

747 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

11 Experts available now in Live!

Get 1:1 Help Now