Solved

cc inches.c gives an error - cc does not see <stdio.h>, not sure why ...

Posted on 2004-03-26
2
258 Views
Last Modified: 2010-04-15
alex /home/alex/c> more inches.c                            
/* This program converts 10 feet to inches. */                        
                                                                     
#include <stdio.h>                                                    
                                                                     
int main()                                                            
{                                                                    
        int inches, feet;                                            
                                                                     
        feet = 10;                                                    
        inches = feet * 12;                                          
        printf("There are %d inches in %d feet.\n", inches, feet);    
}                                                                    
alex /home/alex/c>            
NCR High Performance C Compiler R3.0c                                          
(c) Copyright 1994-97, NCR Corporation                                          
(c) Copyright 1987-97, MetaWare Incorporated                                    
E "inches.c",L3/C1:     Can't open "stdio.h": No such file or directory        
Unable to proceed                                                              
Aborting(21)...                                                                
                             
0
Comment
Question by:AlexF777
2 Comments
 
LVL 12

Assisted Solution

by:andrewjb
andrewjb earned 50 total points
Comment Utility
You're probably missing some environmental variable to tell cc where to look for the include files...

But, sorry, don't know your platform so can't tell you more..

(Try man cc!)
(Or ask someone who's compiling OK to check env vars)
0
 
LVL 9

Accepted Solution

by:
ankuratvb earned 75 total points
Comment Utility
Check in ur include path,whether u have stdio.h or not.
It might have got deleted or ur path is set to the wrong directory and it is not able to find
the stdio.h. file

To check this,just give any other header file name for include such as stdlib.h for e.g. or math.h

If it still gives u the same error,ur path for include files is wrong otherwise if u dont get error
for other header files,ur stdio.h has been deleted.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now