LinuxQuestions.org
Help answer threads with 0 replies.
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 09-20-2004, 06:27 AM   #1
gjo
Member
 
Registered: Aug 2004
Location: South India
Distribution: Fedora3,Xandros,WinXP
Posts: 53

Rep: Reputation: 15
Angry can't compile C pgm in SUSE 9.1


hi, i'm new to SUSE
i have done c pgm in redhat (for compile i use 'cc' command and execute "./a.out")
but i don't know how to compile and execute C pgm in SUSE . I try cc, gcc commands but an error produce like"bash: bad command"

I checked if it installed or not. i have found through YaST it is installed correctly.
i try "cpp" command but it will just print the pgm preceeded by some lines

Plz anyone help me immediatly

Last edited by gjo; 09-20-2004 at 06:39 AM.
 
Old 09-20-2004, 07:24 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
The compiler name is 'gcc'. If it produces such an error it means it's not installed or you don't have it in your PATH. You can search the whole disk for it:
locate gcc
or, if you don't have locate or its database
find / -name gcc
(but this can take some time).

Does the executable exist?
 
Old 09-20-2004, 07:44 AM   #3
gjo
Member
 
Registered: Aug 2004
Location: South India
Distribution: Fedora3,Xandros,WinXP
Posts: 53

Original Poster
Rep: Reputation: 15
thanks ...i will check it today
 
Old 09-20-2004, 11:35 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Use Yast, Install/Remove software

Hi -

Mara is absolutely correct: if bash can't find it, you either don't have it in your path or it isn't installed.

Assuming you have "root" privilege, the first place to look is "Yast, Install/Remove Software". Do a "search" for gcc. If it's not installed, just check the blank box (to install it), click [Apply] ... and feed YaST your CD's when prompted.

'Hope that helps .. PSM
 
Old 09-22-2004, 02:30 AM   #5
gjo
Member
 
Registered: Aug 2004
Location: South India
Distribution: Fedora3,Xandros,WinXP
Posts: 53

Original Poster
Rep: Reputation: 15
Angry still problem

hi, i'm using SUSE 9.1 personal . i installed it in 2 machines. both have the same proble.

hi mara, i checked using this command:

find / -name gcc

the rusult was

find:/media/cdrom:No medium found

then i insert the suse installation cd and again execute the same command. then it display:

find:.changed during execution of find

Hi paulsm, i have root privilage.
i open the window install/remove s/w in Yast, and type gcc in search box
after search it displays the right side top
cpp
libgcc
both are preceeded by a chekbox with checkmark.
And also find the bottom of window the description
cpp-the gccpreprocesor
and version(3.3.3-41),location(cpp-3.3.3-41.i586.rpm) media No(1 0), license etc...

Now wat shall i do?. Give me a solution...
 
Old 09-22-2004, 02:51 AM   #6
DiWi
Member
 
Registered: Jun 2004
Location: Frankfurt/M Germany
Distribution: SuSE 9.3/10.2/10.3
Posts: 64

Rep: Reputation: 16
Hi

The SuSE personal edition does not include any working compilers, like gcc, but you can install them via network connection from a ftp mirror.

In order to activate the ftp server as installation source do the following steps:

Open a browser and go to suses homepage. Go to "home user", download, SuSE Linux, find mirror:
http://www.suse.com/us/private/downl...t_mirrors.html

Try some mirrors near to you. After you found one, thats suitable browse throug the ftp directory until you find something like ftp.suse.com /pub/suse/i386/9.1 . Remember server and path to the 9.1 release
Now open Yast and add a new installation source. The type is ftp, the server is ftp.suse.com the directory is /pub/suse/i386/9.1. After you click add Yast tests the source, if it is a valid source.
Now open add/remove software in Yast. If you do this the first time after adding a new installation source it will take some several minutes for downloading the available package list.
Then you can simply add the following packages gcc, make, ...
After Yast installed this packages and updated the links, you should be able to open a shell and gcc will be in the path. Try which gcc and he will tell you where it finds the executable, if it is in the path setting

Please run the update from yast everytime you installed new packages, because these could be outdated.

Dirk
 
Old 09-22-2004, 11:53 AM   #7
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Thanx, DiWi.

I knew the compilers weren't installed by default (by and large, a Good Thing), but I *didn't* know that the "Personal" edition didn't contain *any* compilers.

Thank you again!
 
Old 09-23-2004, 07:58 AM   #8
gjo
Member
 
Registered: Aug 2004
Location: South India
Distribution: Fedora3,Xandros,WinXP
Posts: 53

Original Poster
Rep: Reputation: 15
Unhappy

Hi .I don't have internet connection in my home. So i can't install it diretly from the net. Is there any way to download the compiler and installed it from the harddisk.

again i need help from you
 
Old 09-23-2004, 08:11 AM   #9
DiWi
Member
 
Registered: Jun 2004
Location: Frankfurt/M Germany
Distribution: SuSE 9.3/10.2/10.3
Posts: 64

Rep: Reputation: 16
no problem:

go to any suse mirror and change to the 9.1 distribution directrory
you need from the suse/i586 directory the following packages:

gcc-3.3.3-41.i586.rpm
libgcc-3.3.3-41.i586.rpm
glibc-2.3.3-98.i586.rpm
glibc-devel-2.3.3-98.i586.rpm

and maybe some more, I'm not completely shure....

Dirk
 
Old 09-24-2004, 02:01 AM   #10
gjo
Member
 
Registered: Aug 2004
Location: South India
Distribution: Fedora3,Xandros,WinXP
Posts: 53

Original Poster
Rep: Reputation: 15
Smile

thankyou, i'm going to install these files.

i have doubt, why the yast displays that list when i search gcc?
 
Old 10-25-2004, 11:00 AM   #11
digdug
LQ Newbie
 
Registered: Oct 2004
Distribution: SUSE Linux 9.1 personal
Posts: 1

Rep: Reputation: 0
yast problem?

like "gjo" I need to install gcc on my suse 9.1 personal linux (I need to recompile kernel to get my wireless network adapter working.) I have the 4 gcc packages on CD and also copied to HD. The 1st time I tried to install (just the main gcc rpm) I got a conflict warning - I bailed thinking I should install the the whole set of 4 at once. But now when I use yast>install/remove SW, Yast2 starts, I get a very brief message "Reading package info;1 moment please..." - that goes away, yast2 goes away - nada. Install/remove still finds packages when I point to the original SUSE install CD but gets lost when pointing to the gcc CD or HD dir.
 
  


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
Can't compile on SUSE 9.3 TallGuy Linux - Software 3 08-07-2005 04:12 PM
starting java pgm at services bgcynthia Red Hat 0 10-06-2004 12:00 AM
Any IT managers in here? Writing COBOL pgm to show @ interview superztnt Programming 0 07-05-2004 05:24 PM
fprintf is not working in rpc server pgm ratheesh Programming 1 01-08-2004 08:33 PM
problems compiling qt-pgm engman Programming 0 05-31-2001 07:27 PM

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

All times are GMT -5. The time now is 09:26 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