Results 1 to 6 of 6
Hello. I've just installed gcc from the stable repos on Debian etc, and for some reason it doesn't recognize its stdio.h file. Here's a simple hello world program I used ...
- 06-16-2007 #1Just Joined!
- Join Date
- Apr 2007
- Posts
- 13
gcc refuses to compile stuff
Hello. I've just installed gcc from the stable repos on Debian etc, and for some reason it doesn't recognize its stdio.h file. Here's a simple hello world program I used to test it:
#include <stdio.h>
main()
{
for(;
{
printf ("Hello World!\n");
}
}
And here's the gcc output:
srecko@debian:~/Desktop$ gcc hello_world.c
hello_world.c:2:19: error: stdio.h: No such file or directory
hello_world.c: In function ‘main’:
hello_world.c:8: warning: incompatible implicit declaration of built-in function ‘printf’
hello_world.c:10:2: warning: no newline at end of file
I have cpp-4.1,gcc 4.1.gcc 4.-base,gcc3.4-base and libgcc1 packages installed. All libraries are there, but gcc seems to ignore them.
Edit: The formatting code on this page has interpreted a semicolon followed by a bracket as
. There are no smiley faces in the code
- 06-19-2007 #2
For the instance if you are sure that the glibc are installed,and the stdio.h file is in /use/include try to put #include "/usr/include/stdio.h" instead of #include<stdio.h>
if that works ,so you have something broken in the dynamic linker i guess this is due to uninstall operation.
post if there is any news.
Cheers.Linux is not only an operating system, it's a philosophy.
Archost.
- 06-19-2007 #3Just Joined!
- Join Date
- Apr 2007
- Posts
- 13
Ok, I copied the libs to /usr/include (mainly stdio.h and ssp.h) but now I get the following message
srecko@debian:~$ gcc hello_world.c
In file included from hello_world.c:2:
/usr/include/stdio.h:40:24: error: no include path in which to search for stdio.h
although I wrote
#include "/usr/include/stdio.h"
in the source file.
If the linker is broken how do I fix it? Thanks for the reply.
- 06-19-2007 #4
No you don't have to copy anything,to copy stdio.h then your source code will find the file but it'll not able to find it's reference,if before you didn't have these file so you have to install/reinstall the glibc-2.5-i486-2 ,glibc-i18n-2.5-noarch-2 , glibc-profile-2.5-i486-2 , glibc-solibs-2.5-i486-2
, glibc-zoneinfo-2.5-noarch-2.
hope this help.Linux is not only an operating system, it's a philosophy.
Archost.
- 06-19-2007 #5Just Joined!
- Join Date
- Apr 2007
- Posts
- 13
Whoops. No wonder gcc could not find it's stdio.h file, I had to install libc-dev package
. Seems like a case of brain fart on my side
.
Thank for the help, anyway
- 06-19-2007 #6Linux is not only an operating system, it's a philosophy.
Archost.


Reply With Quote

