Hi all,
I was trying to write a simple c code, but getting "fatal error: stdio.h: No such file or directory" error when compiling it.
I've confirmed that "stdio.h" is there. See the details & the code below.
tc@box:~/c$ cat hello.c
#include <stdio.h>
int
main (void)
{
printf ("Hello, world!\n");
return 0;
}
tc@box:~/c$
COMPILE IT, but getting error
tc@box:~/c$ gcc hello.c -o hello
hello.c:1:19: fatal error: stdio.h: No such file or directory
compilation terminated.
tc@box:~/c$
No output created
tc@box:~/c$ ls -lh
total 4
-rw-r--r-- 1 tc staff 82 Feb 5 06:08 hello.c
tc@box:~/c$
stdio.h is there
tc@box:~/c$ sudo slocate -u
tc@box:~/c$ sudo slocate stdio.h
/usr/local/include/c++/5.2.0/tr1/stdio.h
/usr/local/lib/gcc/i486-pc-linux-gnu/5.2.0/include/ssp/stdio.h
/usr/local/lib/perl5/5.22.0/i486-linux/CORE/nostdio.h
tc@box:~/c$
Please advise