C compiling on Unix

Discussion in 'Programming' started by siraxi, Jun 10, 2006.

  1. #1
    Hi

    I'm trying to compile a C program on Unix, but when I run in shell the makefile (command make) it gives these errors:
    stdio.h: No such file or directory
    stdlib.h: No such file or directory
    math.h: No such file or directory
    time.h: No such file or directory
    X11/Xlib.h: No such file or directory
    X11/Xutil.h: No such file or directory

    In program's Readme file it says just to run the makefile and it will compile.

    Is it my host missing some files or something I do wrong?

    Thanks for advising!
     
    siraxi, Jun 10, 2006 IP
  2. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Without knowing more, two issues come to mind.

    Make sure the paths in the makefile are correct and that you have enough authority on the computer to compile programs. Remember, Linux imposes roles on users and you may need to be root to make this work. And, not all distros use the same path scheme.
     
    clancey, Jun 11, 2006 IP
  3. paul.martin

    paul.martin Peon

    Messages:
    260
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #3
    paul.martin, Jun 12, 2006 IP
  4. topsearch

    topsearch Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    run this command to see if you have the standard header files:
    
    find / -name "stdio.h" 2>/dev/null
    
    Code (markup):
    If you don't find anything, you don't have them. If you locate them, note what directory they are in and then edit the makefile. Without seeing the makefile, I can't tell you where to add them. Most makefiles will have a variable called $(INCLUDES) or something similar. Add the path to that field.


    good luck.
    g
     
    topsearch, Jun 13, 2006 IP