No such file or directory

This is a discussion on No such file or directory within the C Programming forums, part of the General Programming Boards category; 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 ...

  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
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,752
    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, 07:13 PM
  3. directory/file
    By Cpro in forum C++ Programming
    Replies: 4
    Last Post: 06-06-2008, 10:58 PM
  4. ld: No such file or directory
    By kerryhall in forum Linux Programming
    Replies: 24
    Last Post: 09-10-2007, 08: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-20-2005, 12:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21