?
Solved

GCC says stdio.h doesnt exist

Posted on 2003-03-08
16
Medium Priority
?
389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
  • 2
  • +3
16 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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
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

Docker-Compose to Simplify Multi-Container Builds

Our veteran DevOps Author takes you through how to build a multi-container environment, managed with a single utility in order to simplify your deployments.

Question has a verified solution.

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

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

770 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