Thread: No such file or directory

  1. #1
    Registered User
    Join Date
    Feb 2013
    Posts
    11

    No such file or directory

    Code:
    #include <stdio.h>#include <stdlib.h>
    #include <string.h>
    #include <strings.h>
    I just download Xcode and then run on terminal. The editor is using TeXshop. The file is a .c file. It shows the following errors:

    gene.c:1:19: error: stdio.h: No such file or directory
    gene.c:2:20: error: stdlib.h: No such file or directory
    gene.c:3:20: error: string.h: No such file or directory
    gene.c:4:21: error: strings.h: No such file or directory


    Why ?

    Thanks

  2. #2
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    gene.c:1:19: error: stdio.h: No such file or directory
    gene.c:2:20: error: stdlib.h: No such file or directory
    gene.c:3:20: error: string.h: No such file or directory
    You probably didn't install the Xcode program right if you are getting these. Please make and run a hello world program to confirm that your installation works.

    gene.c:4:21: error: strings.h: No such file or directory
    This probably doesn't exist in your include directory.

    It is probably best if you have the header and the relevant source code or object code in your project directory. I am not that familiar with XCode though.

    Of course it helps if all lines beginning with # are on there own line, as C requires.
    Last edited by whiteflags; 02-10-2013 at 09:45 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 12-06-2012, 02:46 PM
  2. Replies: 6
    Last Post: 04-30-2010, 06:13 PM
  3. directory/file
    By Cpro in forum C++ Programming
    Replies: 4
    Last Post: 06-06-2008, 09:58 PM
  4. ld: No such file or directory
    By kerryhall in forum Linux Programming
    Replies: 24
    Last Post: 09-10-2007, 07:30 PM
  5. How to tell if its a file or a directory
    By earth_angel in forum C++ Programming
    Replies: 3
    Last Post: 08-19-2005, 11:27 PM