Find the answer to your Linux question:
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 ...
  1. #1
    Just 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..

  2. #2
    Just Joined! mitchpotter's Avatar
    Join Date
    Jan 2008
    Location
    Orlando
    Posts
    19
    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.

    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*/
    It helps with somestandard ANSI functions that are defined in different headers on Linux than they are on Windows.

  3. #3
    Just Joined! wildpossum's Avatar
    Join Date
    Apr 2008
    Location
    Sydney/Australia
    Posts
    92
    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.

  4. #4
    Just 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..

  5. #5
    Just 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..

  6. #6
    Just 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 ..

  7. #7
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    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

  8. #8
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by mitchpotter View Post
    I assume you are trying to compile on Linux. <process.h> is a windows only header and I believe <conio.h> is as well.
    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

    # slocate {process.h,conio.h} | grep wine
    /usr/include/wine/msvcrt/process.h
    /usr/include/wine/msvcrt/conio.h
    Winelibs based programs are linux native programs, though their look will resemble this of the windows ones.

    4- Port your program to use only legal ANSI C stuff, so you can compile it and run anywhere.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...