Results 1 to 8 of 8
Hello All I was working with C++ and while running a program i found few problems. One is that process.h is not found and the other header file which is ...
- 04-22-2008 #1Just Joined!
- Join Date
- Apr 2008
- Posts
- 4
process.h : No such file or directory
Hello All I was working with C++ and while running a program i found few problems. One is that process.h is not found and the other header file which is giving the same problem is conio.h. Can anybody tell me what exactly the problem is and how to rectify that .
Thanks & regards
Sam..
- 04-22-2008 #2
I assume you are trying to compile on Linux. <process.h> is a windows only header and I believe <conio.h> is as well. There may be Linux equivilants if you could post what functions you are trying to use. I usually use the following for cross compatability over windows and linux.
It helps with somestandard ANSI functions that are defined in different headers on Linux than they are on Windows.Code:#ifdef _MSC_VER // Windows #include <windows.h> #include <direct.h> #include <process.h> #else // Linux #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> #endif /*_MSC_VER*/
- 04-23-2008 #3
you can find any file you want a couple of ways.
A.> Using "locate" as in "locate process.h" assuming your got the locate find-utils program installed.
B.> By grepping into a directory where you suspect the file your looking for is situated. "grep -R process.h /usr/include/". Usually header files are kept in the /usr/include directory. If your really unsure where the file(s) may be you can look in /usr or /lib directoryies.
C.> You should read the available web sites on Linux for newbies, helping yourself is always more rewarding. Start by going to The Linux Documentation Project for starters.
- 04-23-2008 #4Just Joined!
- Join Date
- Apr 2008
- Posts
- 4
thanks for the reply.
Actually problem is something different what u understood..
the thing is while writing a C++ programme i am using process.h header file and the error i am getting is process.h : No such file or directory
process.h : No such file or directory
So i just want to fix this problem please if you can guide me for that..
- 04-23-2008 #5Just Joined!
- Join Date
- Apr 2008
- Posts
- 4
Actually i downloaded that program from somewhere and i didn't know what to do with that. i think now i need to look at the program again and see what all is happening in the program using the process.h file..
- 04-23-2008 #6Just Joined!
- Join Date
- Apr 2008
- Posts
- 4
and one more thing can you tell me which header file the one which works same as the process.h file ..
- 04-23-2008 #7
So the first thing is that, as mentioned, process.h only exists in Windows implementations. So we certainly cannot simply give you some process.h, as the associated library would not exist.
However, looking at the Wikipedia article:
Process.h - Wikipedia, the free encyclopedia
Several of the functions in process.h exist in unistd.h in UNIX: the various exec() functions and getpid(). The others do not exist in UNIX, but the same thing can be accomplished:
The spawn() family can be accomplished by fork()ing, then exec()ing in the new child process. The thread implementation for Linux is called pthreads (POSIX Threads), and those functions are documented in the pthreads man page.
I hope this helps!DISTRO=Arch
Registered Linux User #388732
- 04-23-2008 #8Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
Yep. conio.h is out as well. I think this is turboc/borland legacy stuff. This is what happens when you don't use standard ansi C libs and functions.
You have many options:
1.- find a compiler for linux that implements this, I don't know if there's any.
2.- write your own, or port those libs provided that the license permits it
3.- consider converting this program to a winelib based one: i know for sure that winelibs do contain those libs
Winelibs based programs are linux native programs, though their look will resemble this of the windows ones.# slocate {process.h,conio.h} | grep wine
/usr/include/wine/msvcrt/process.h
/usr/include/wine/msvcrt/conio.h
4- Port your program to use only legal ANSI C stuff, so you can compile it and run anywhere.


Reply With Quote
