LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-19-2008, 04:05 AM   #1
anikethan_310
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Rep: Reputation: 0
How to Compile C Programmes in Ubuntu???


Hello,
Am new to Linux. For a few days used Zenwalk Distribution. Now have switched over to Ubuntu. I installed Ubuntu 7.10(Gutsy Gibbon). When I try to compile my C programs, none of the header files are being recognized. Any suggestions??
Thank You.
 
Old 08-19-2008, 04:17 AM   #2
MarkByers
LQ Newbie
 
Registered: Jul 2008
Posts: 6

Rep: Reputation: 0
What exactly is the error?

Have you installed build-essential?
 
Old 08-20-2008, 02:31 PM   #3
anikethan_310
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Hello. Thanks for the reply and sorry for the delay. Well for a better picture I have included below both the program I typed and the errors it showed, as in the terminal. Could you please specify what "Build Essential" is? Shall try to find through Google if possible. Thank You.

PROGRAM:
#include<stdio.h>
main(void)
{
printf("Hello\n");
return(0);
}

ERROR MESSAGE IN TERMINAL:
anikethan@anikethan-desktop:~$ gcc 1.c
1.c:1:18: error: stdio.h: No such file or directory
1.c: In function ‘main’:
1.c:4: warning: incompatible implicit declaration of built-in function ‘printf’
anikethan@anikethan-desktop:~$
 
Old 08-20-2008, 07:57 PM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
/usr/include/stdio.h is provided by the package libc6-dev. I think that if you install the virtual package build-essential as Mark suggested, this should be brought in as a dependency. i.e. open synaptic and install the package build-essential, and it will automatically install what you need.
 
Old 08-21-2008, 12:47 AM   #5
anikethan_310
LQ Newbie
 
Registered: Aug 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Hello,
Thank you for the reply. Have got it working by installing Build Essential as suggested.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Install programmes lijoyx Linux - Newbie 1 11-05-2007 11:44 AM
installing downloaded programmes cherith.brook Linux - Newbie 2 10-16-2007 05:16 PM
Can't install programmes in ubuntu crustydaze Linux - Software 8 02-20-2007 08:30 AM
removing programmes (games) master Red Hat 2 07-06-2005 04:12 PM
Compiling programmes: How to use #ifdef? asciimonster Linux - General 1 12-13-2004 02:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration