Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Mar 2007
    Posts
    2

    Default can't compile with gcc: can't find <stdio.h>

    On my VPS site I'm trying to use gcc but I can't even compile a hello world program:
    #include <stdio.h>

    main(){
    printf("Hello World\n");
    }
    if I try to compile I get:

    gcc helloWorld.c
    helloWorld.c:1:19: stdio.h: No such file or directory

    but if I execute:
    gcc -print-search-dirs I get:
    install: /usr/lib/gcc-lib/i386-redhat-linux/2.96/

    programs: =/usr/lib/gcc-lib/i386-redhat-linux/2.96/:
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/:
    /usr/lib/gcc-lib/i386-redhat-linux/:
    /usr/lib/gcc/i386-redhat-linux/2.96/:
    /usr/lib/gcc/i386-redhat-linux/:
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../../i386-redhat-linux/bin/i386-redhat-linux/2.96/:
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../../i386-redhat-linux/bin/

    libraries: =/usr/lib/gcc-lib/i386-redhat-linux/2.96/:
    /usr/lib/gcc/i386-redhat-linux/2.96/:
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../../i386-redhat-linux/lib/i386-redhat-linux/2.96/:
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../../i386-redhat-linux/lib/:
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../i386-redhat-linux/2.96/:
    /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../:
    /lib/i386-redhat-linux/2.96/:
    /lib/:
    /usr/lib/i386-redhat-linux/2.96/:
    /usr/lib/

    This may be proper, I don't know where the usual include files should be but I notice there are no gcc related files in /usr/libexec, unlike on my fedora core 4 system at home.

    Since they provide gcc I assume it normally works and I'm making a naive mistake, can anyone help?

  2. #2
    Senior Member torrin's Avatar
    Join Date
    May 2003
    Location
    Vista, CA
    Posts
    534

    Default

    It's in /usr/include. If it's not there, go into the site manager and uninstall and reinstall the gnu compiler collection. If it's still not there after that, you should contact support.

Similar Threads

  1. help install or compile ffmpeg binaries?
    By windpipe in forum General Discussion
    Replies: 12
    Last Post: 08-09-2009, 02:14 AM
  2. Gcc
    By Andreas in forum General Discussion
    Replies: 4
    Last Post: 12-21-2008, 03:02 PM
  3. Libxslt/lixml2 for Icecast
    By Blackfyr in forum PHP / MySQL
    Replies: 0
    Last Post: 09-20-2007, 03:31 PM
  4. Upgrade of gcc
    By reflective in forum Comments / Suggestions
    Replies: 1
    Last Post: 11-24-2005, 09:49 PM
  5. find function in unix
    By firebirdfan in forum General Discussion
    Replies: 2
    Last Post: 05-06-2004, 02:37 AM

Posting Permissions

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