Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

GCC says stdio.h doesnt exist

Posted on 2003-03-08
16
Medium Priority
?
393 Views
Last Modified: 2010-04-21
i installed slackware and did it all correctly. im pretty much going for text only without the distraction of the net or games to finish my study of C, so i installed slak 8.1 on my secondary machine. it boots and logs in correctly (even gives me a fortune, w00t) but when i go to compile the standard test of a hello world program, gcc tells me that stdio.h doesnt exist. i had this problem a few months back, but i dont think i ever fixed it. and i havent had the problem with every install from this cd or this cd drive either.

so, any help?  
0
Comment
Question by:Jaer
  • 7
  • 3
  • 2
  • +3
15 Comments
 
LVL 8

Expert Comment

by:akshayxx
ID: 8097544
check this directory
/usr/include/  for stdio.h
and also
/usr/local/include/


if the file is there .. then may be u need to modify ur compilation options .. and it should work..


also why not try finding on ur whole linux itself
find / -name stdio* -print

see if u find any result
0
 
LVL 5

Expert Comment

by:bryanh
ID: 8124699
It would take a remarkably misconfigured system for gcc (with no command options) not to find stdio.h.
0
 

Author Comment

by:Jaer
ID: 8125015
one would think so, but ive installed linux many times (always going back to windows due to lack of experience) and this has only happened twice.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 8

Expert Comment

by:akshayxx
ID: 8125546
did u tried to search the stdio.h file on whole of ur system ?

0
 
LVL 3

Expert Comment

by:rfr1tz
ID: 8127561
OK, i'll ask the obvious question. Did you include the line

#include <stdio.h>


at the top of your program with the <> angle brackets, not "" quotes?
0
 

Author Comment

by:Jaer
ID: 8128629
yes i searched the system (with a few different commands) and yeah, i used the <> brackets

lol
0
 
LVL 5

Expert Comment

by:bryanh
ID: 8129317
Is there anything at all in /usr/include?

I'm sure there's an option for installing a system without the ability to compile new programs on it, in which case the C library interface headers would not be installed, thus saving a small amount of disk space.  But I would expect such a system not to have the compiler installed either.  And it would be something you'd have to be pretty explicit about wanting.
0
 
LVL 8

Expert Comment

by:akshayxx
ID: 8132936
i guess he didnt install the package needed for development libraries and includes..
0
 
LVL 8

Accepted Solution

by:
akshayxx earned 500 total points
ID: 8132963
try this


[root@akshay root][10:01:56]$ rpm -qa |grep libc
libcap-devel-1.10-12
glibc-kernheaders-2.4-7.20
libcapplet0-1.4.0.1-9
glibc-2.2.93-5
glibc-common-2.2.93-5
libcap-1.10-12
glibc-devel-2.2.93-5
[root@akshay root][10:02:06]$ rpm -ql glibc-devel-2.2.93 |less


stdio.h and other headers come with this package .. glibc-devel... make sure u have got this one installed



0
 

Expert Comment

by:ppnht
ID: 8345870
Hi,

I had the same problem as you. To solve that problem, I put the installation CD and installed manually the package glibc-2.2.5-i386-2.tgz, which is located on the path slackware/l (in the CD), with pkgtool (you can also use installpkg).

  Anyway, after I've done this, stdio.h and many other standard C library headers appeared on the path /usr/include.

  Good luck.
0
 
LVL 8

Expert Comment

by:akshayxx
ID: 8345941
i told him to check for the glibc package .. but it seems the host has abandoned this question
0
 

Author Comment

by:Jaer
ID: 8345947
the problem had been resolved (a friend who knows more than i reinstalled it for me) but i know ill have a problem like this in the future, so i will keep taking "notes" of the answers given. it sucks that i cant give the points to everyone, because i dont know what the real answer is.
0
 
LVL 8

Expert Comment

by:akshayxx
ID: 8346231
the real answer is , problem was due to absence of required library for C development .. and the particular libary on linux is .. glibc..

from next time .. if u install linux ..and if u intend to do c programming on it .. then in the installation step .. where u r asked for packages to install .. dont forget to choose
programming/development libraries
0
 
LVL 8

Expert Comment

by:akshayxx
ID: 8346244
and as for the points .. u can decide easily who pointed out the error ..
see my comment where i have mentioned . checking for the lobrary
glibc-devel .. i clearly said .. stdio.h comes in that package..

u can check with this
rpm -ql glibc-devel |grep stdio
0
 
LVL 20

Expert Comment

by:jmcg
ID: 10101998
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: akshayxx {http:#8132963}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Screencast - Getting to Know the Pipeline
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month12 days, 12 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question