Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 20-09-2008, 01:05 PM   #1 (permalink)
Back!
 
red_devil's Avatar
 
Join Date: Jun 2007
Location: Bangalore
Posts: 513
Default ubuntu - gcc package problem


Guys, today i installed a copy of Ubuntu 7.04 { from a CD and not a DVD }... since the CD comes with limited packages, i'm having a problem with the GCC package.

i tried to run some sample C program to make sure the GCC was properly installed and when i tried to compile, i got an error message saying
Code:
error: stdio.h: No such file or directory
now i want to know how i can completely remove any existing GCC package and install GCC again so that i'm able to run any of the codes easily..
red_devil is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 20-09-2008, 01:20 PM   #2 (permalink)
Human Spambot
 
Join Date: Jan 2007
Location: Lat 28.38°N , Longt 77.13°E
Posts: 2,431
Default Re: ubuntu - gcc package problem

^^Gcc follows standard C++, so header files are to be used without .h extension. Try with #include<cstdio>
ThinkFree is offline  
Old 20-09-2008, 01:22 PM   #3 (permalink)
Back!
 
red_devil's Avatar
 
Join Date: Jun 2007
Location: Bangalore
Posts: 513
Default Re: ubuntu - gcc package problem

^^ nah not working... .getting similar error
red_devil is offline  
Old 20-09-2008, 04:25 PM   #4 (permalink)
The Smaller Bang
 
MetalheadGautham's Avatar
 
Join Date: Sep 2007
Location: Gautham City
Posts: 7,492
Default Re: ubuntu - gcc package problem

For C++,
Code:
#include<iostream>
using namespace std;
For C,
Code:
#include<stdio>
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
MetalheadGautham is online now  
Old 20-09-2008, 05:19 PM   #5 (permalink)
in search of myself
 
CadCrazy's Avatar
 
Join Date: Sep 2006
Location: Gurgaon
Posts: 1,720
Default Re: ubuntu - gcc package problem

You have only installed gcc compiler and not the standard c header/lib files. To install all run following command in terminal

Code:
sudo apt-get install build-essential
Happy programming
__________________
::::::::::::::::::::
Unban Praka123
::::::::::::::::::::
Vista is my Secretary | Mac is my Girlfriend | Linux is my Wife
"Ek Se Mera Kya Hoga" :lol:
CadCrazy is offline  
Old 20-09-2008, 05:38 PM   #6 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: ubuntu - gcc package problem

And the build-essential bundle can also be installed from the Installer/Live CDs, in case you don't have internet access on Linux.
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 20-09-2008, 05:49 PM   #7 (permalink)
in search of myself
 
CadCrazy's Avatar
 
Join Date: Sep 2006
Location: Gurgaon
Posts: 1,720
Default Re: ubuntu - gcc package problem

^^ Yes. Here's how
Insert cd in drive and enter following commands one by one

Quote:
sudo apt-cdrom add
sudo apt-get update
sudo apt-get install build-essential
__________________
::::::::::::::::::::
Unban Praka123
::::::::::::::::::::
Vista is my Secretary | Mac is my Girlfriend | Linux is my Wife
"Ek Se Mera Kya Hoga" :lol:
CadCrazy is offline  
Old 21-09-2008, 12:59 AM   #8 (permalink)
Back!
 
red_devil's Avatar
 
Join Date: Jun 2007
Location: Bangalore
Posts: 513
Default Re: ubuntu - gcc package problem

ah thanks guys...it worked...{ the online update thing worked.. the one suggested by CadCrazy didn't }

and btw me facing some newer problems... VI editor doesn't seem to be working fine... the insertion of text isn't happening properly... i guess some problem with the INSERT mode of the editor...any suggestions wrt this ???
red_devil is offline  
Old 21-09-2008, 02:16 AM   #9 (permalink)
Wire muncher!
 
infra_red_dude's Avatar
 
Join Date: Nov 2003
Posts: 6,173
Default Re: ubuntu - gcc package problem

Aah well.. happens sometime. Try using vim instead of vi.
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."

http://phoenix-ani.blogspot.com
infra_red_dude is offline  
Old 21-09-2008, 09:08 AM   #10 (permalink)
The Smaller Bang
 
MetalheadGautham's Avatar
 
Join Date: Sep 2007
Location: Gautham City
Posts: 7,492
Default Re: ubuntu - gcc package problem

^^And if you are a n00b like me, use nano.
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
MetalheadGautham is online now  
Old 21-09-2008, 09:14 AM   #11 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default Re: ubuntu - gcc package problem

infra_red_dude - I doubt if the vi he is using is classic, cause on most newer distros vi is a mere link to vim!
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 21-09-2008, 09:15 AM   #12 (permalink)
OSS Enthusiast!
 
nitish_mythology's Avatar
 
Join Date: Sep 2005
Location: Hills of Kumaoun
Posts: 664
Default Re: ubuntu - gcc package problem

^^
Yeah..Even I am more comfortable with Nano.
__________________
Do you know, Shinigamis only eat apples???
nitish_mythology is offline  
Old 21-09-2008, 09:51 AM   #13 (permalink)
Wire muncher!
 
infra_red_dude's Avatar
 
Join Date: Nov 2003
Posts: 6,173
Default Re: ubuntu - gcc package problem

@QM
Hmm... Point...
__________________
"The true measure of a man is how he treats someone who can do him absolutely no good."

http://phoenix-ani.blogspot.com
infra_red_dude is offline  
Old 21-09-2008, 08:43 PM   #14 (permalink)
Back!
 
red_devil's Avatar
 
Join Date: Jun 2007
Location: Bangalore
Posts: 513
Default Re: ubuntu - gcc package problem

@QM- i dunno if the VI i'm using is a classic version or not .. its the default thing that comes with Ubuntu 7.04 cd...

and how do i install vim ??
red_devil is offline  
Old 22-09-2008, 03:37 PM   #15 (permalink)
The Smaller Bang
 
MetalheadGautham's Avatar
 
Join Date: Sep 2007
Location: Gautham City
Posts: 7,492
Default Re: ubuntu - gcc package problem

Quote:
Originally Posted by n6300 View Post
@QM- i dunno if the VI i'm using is a classic version or not .. its the default thing that comes with Ubuntu 7.04 cd...

and how do i install vim ??
7.04 ? Then I think its vim. I used Ubuntu 7.04 for a whole year. It was my first distro

And yeah, you might want to try out nano if you want something without all those confusing shortcuts and what not. Its just a text editor, a plain and simple one, and feels like using notepad without mouse. Any actions like quiting, cuting, etc need you to use ctrl+key, with the keys being defined in the bottom of the window itself for you to see.
__________________
http://TheSmallerBang.wordpress.com
eMachines E725 - T4400 2.2GHz, 1GB, 160GB
Nokia 5130XM * T-Sonic 610 2GB
Nokia 2323C * Samsung Galaxy Y
Apple iPad 2 16GB WiFi
MetalheadGautham is online now  
Closed Thread

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Offline Ubuntu Package Center CadCrazy Open Source 137 16-02-2009 04:13 PM
Ubuntu 8, Fedora 9 package OpenJDK CadCrazy Open Source 13 09-05-2008 11:56 PM
How to install rpm and .tx package in UBUNTU DukeNukem Open Source 11 01-11-2006 03:54 PM
Command to see dependencies of a package in Ubuntu vinayasurya Open Source 4 21-06-2006 12:09 PM
Problem with Windows Installer package Nariman Software Q&A 5 21-03-2006 01:42 PM

 
Latest Threads
- by gforz
- by soumya
- by Sujeet
- by icebags
- by Charan

Advertisement




All times are GMT +5.5. The time now is 02:51 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2