Link to home
Create AccountLog in
Avatar of liorsolomon
liorsolomon

asked on

Default headers location - gcc

This is a beginners question
I wanted to know where should i locate the gcc headers on a ubuntu distro
I checked the /usr/include folder but nothing there
and i keep on getting gcc error while trying to include stdio.h header
Thanks
Avatar of sjm_ee
sjm_ee
Flag of United Kingdom of Great Britain and Northern Ireland image

Please port the relevant part of your source and the command line you are using to try to compile and the error message.
Avatar of liorsolomon
liorsolomon

ASKER

just a sample code:

#include <stdio.h>

int main(){

             char bell = '\\a';
             printf ("gring!%c\\n",bell);
}

command line:
gcc bell.c -o bell

bell.c:1:19: error: stdio.h: No such file or directory
/usr/include is the default location.  How did you install gcc?
Where is it installed?  What does the command 'which gcc' return?
well i figured it out already
the issue was that i installed basic ubuntu distro and gcc was already installed
but the libc-dev wasn't
i just added it and now i have all the missing files
thanks anyway
Avatar of Duncan Roe
Post in the community support area asking for a refund
can you give me please the link to the community support area?
I just post a message asking for refund?
All topics / Community Support
Dear,
simply locate for file stdio.h, in Red Hat Linux it is done with locate command, (# locate filename )
search for similar command in Ubuntu linux, then update your make file.

All the best
S.Prashant Sabnekar
Prashant - look at the comments above. He already fixed it for himself (hadn't installed glibc-devel). I say refund his points.
ASKER CERTIFIED SOLUTION
Avatar of GranMod
GranMod

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer