LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-09-2008, 12:34 PM   #1
debianlam
LQ Newbie
 
Registered: Jan 2007
Posts: 21

Rep: Reputation: 0
gcc compiler cannot find header file stdio.h / stdlib.h


hello
i tried to compile prog.c by gcc but i had the following error :


(none):/home/user1# gcc prog.c
prog.c:1:19: error: stdio.h: No such file or directory
prog.c:2:20: error: stdlib.h: No such file or directory
prog.c: In function ‘main’:
prog.c:15: warning: incompatible implicit declaration of built-in function ‘printf’
(none):/home/user1#
help = welcome
debianlam
 
Old 05-09-2008, 01:05 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
What distribution are you using?

Do you have the glibc-devel package installed?

------------------------
Steve Stites
 
Old 05-09-2008, 03:33 PM   #3
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
Does your file use <> around the include file name? Example:

Code:
#include <stdlib.h>
#include <stdio.h>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GCC wont find header files... pengu Programming 1 12-06-2006 11:31 PM
how do find out whether i have gcc compiler installed? ashlesha Linux - Newbie 3 06-27-2006 03:42 PM
no stdio.h header tigeraven Programming 1 12-28-2005 06:35 PM
gcc won't find stdio.h .... or anything else either Thulas Programming 3 02-24-2005 12:22 AM
how to find the header files in c compiler ss100 Linux - Software 2 12-12-2004 11:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration