Tiny Core Extensions > TCE Talk
gcc | fatal error: stdio.h: No such file or directory
(1/1)
Adam:
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.
--- Code: ---tc@box:~/c$ cat hello.c
#include <stdio.h>
int
main (void)
{
printf ("Hello, world!\n");
return 0;
}
tc@box:~/c$
--- End code ---
COMPILE IT, but getting error
--- Code: ---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$
--- End code ---
No output created
--- Code: ---tc@box:~/c$ ls -lh
total 4
-rw-r--r-- 1 tc staff 82 Feb 5 06:08 hello.c
tc@box:~/c$
--- End code ---
stdio.h is there
--- Code: ---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$
--- End code ---
Please advise
bmarkus:
Did you install compiletc.tcz?
Also, without providing TC version and architecture hard to help. Is it ARM, x86_6.4, 8.0, 7.1, ... ?
Adam:
Thanks bmarkus :)
I didn't know that compiletc.tcz is required.
Download
--- Code: ---tce-load -wi compiletc.tcz
--- End code ---
--- Code: ---tc@box:~/c$ gcc hello.c -o halow
tc@box:~/c$ ls -lh
total 12
-rwxr-xr-x 1 tc staff 6.5K Feb 5 06:55 halow
-rw-r--r-- 1 tc staff 82 Feb 5 06:08 hello.c
tc@box:~/c$ ./halow
Hello, world!
tc@box:~/c$
--- End code ---
Navigation
[0] Message Index
Go to full version