to include header files while executing a c program in ubuntu

Asked by sindhu.sinni@gmail.com

i'm using ubuntu for the first time i want to execute a c program and trying to compile it. but the problem is i'm not able to include any of the header files. the error is
lin.c:63:18: error: stdio.h: No such file or directory
so plz help me in solving the above said problem.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Hanusz leszek (leszek-skynet) said :
#1

Hello,

You need to install the build-essential package:
sudo apt-get install build-essential

Revision history for this message
Bhavani Shankar (bhavi) said :
#2

Hello...
C programs on linux run on GCC (GNU Compiler for C) and its included in the build-essential package on the ubuntu live cd.. you can use the live cd open up synaptic package manager(System -> Administration synaptic package manager) and give a search with keywords build-essential and right click on the package and mark for installation -> Mark -> Apply.. or use sudo apt-get install build-essential command in a terminal (Applications -> Accessories -> terminal) to do your job..

br,

Bhavani Shankar.

Revision history for this message
lyle (lylebacon) said :
#3

It is strange that gcc is provided with the initial package, but the usually needed include files are not.
I think that they should be provided in the first place (like Fedora or the Mac), or there should be prominent notification with Ubuntu installation. (The absence of these files was a major puzzlement for me.)

Can you help with this problem?

Provide an answer of your own, or ask sindhu.sinni@gmail.com for more information if necessary.

To post a message you must log in.