jesaisrien
July 20th, 2010, 09:19 PM
Hi experts!
I too have one of those nagging "stdio.h file or directory not found" things when I try to compile with gcc.
I do the following:
gcc hello.c
which gives:
hello.c:1:20: error: stdio.h: No such file or directory
hello.c: In function ‘main’:
hello.c:5: warning: incompatible implicit declaration of built-in function ‘printf’
I have reinstalled libc6-dev.
I have reinstalled build-essential.
"Locate stdio.h" pulls up the following;
/home/fredx/Downloads/stellarium/stellarium-0.10.4/src/external/kdewin32/stdio.h
/usr/include/stdio.h
/usr/include/bits/stdio.h
/usr/include/boost/iostreams/filter/stdio.hpp
/usr/include/c++/4.2/tr1/stdio.h
/usr/include/c++/4.4/tr1/stdio.h
/usr/include/glib-2.0/glib/gstdio.h
/usr/include/unicode/ustdio.h
/usr/lib/perl/5.10.0/CORE/nostdio.h
echo $PATH gives the following:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
I've added "/usr/include" to the end of $PATH,
PATH=$PATH:/usr/include
giving:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/include
but that doesn't change the results.
Using ubuntu jaunty 9.04
I'm lost. Any suggestions?
I should add that hello.c looks like this;
#include < stdio.h>
void main()
{
printf("\nHello, World!\n");
}
I too have one of those nagging "stdio.h file or directory not found" things when I try to compile with gcc.
I do the following:
gcc hello.c
which gives:
hello.c:1:20: error: stdio.h: No such file or directory
hello.c: In function ‘main’:
hello.c:5: warning: incompatible implicit declaration of built-in function ‘printf’
I have reinstalled libc6-dev.
I have reinstalled build-essential.
"Locate stdio.h" pulls up the following;
/home/fredx/Downloads/stellarium/stellarium-0.10.4/src/external/kdewin32/stdio.h
/usr/include/stdio.h
/usr/include/bits/stdio.h
/usr/include/boost/iostreams/filter/stdio.hpp
/usr/include/c++/4.2/tr1/stdio.h
/usr/include/c++/4.4/tr1/stdio.h
/usr/include/glib-2.0/glib/gstdio.h
/usr/include/unicode/ustdio.h
/usr/lib/perl/5.10.0/CORE/nostdio.h
echo $PATH gives the following:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
I've added "/usr/include" to the end of $PATH,
PATH=$PATH:/usr/include
giving:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/include
but that doesn't change the results.
Using ubuntu jaunty 9.04
I'm lost. Any suggestions?
I should add that hello.c looks like this;
#include < stdio.h>
void main()
{
printf("\nHello, World!\n");
}