LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 02-25-2004, 09:57 PM   #1
mschua44
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Rep: Reputation: 0
how to compile and run c program under mandrake 9.2 ??


hi,

pls help me. how to sompile and run c program under mandrake 9.2?
pls provide me full command.

i had tried "gcc sum.c -o sum.out" but doesn't work. izit any problem on my installation ?


mschua.
 
Old 02-25-2004, 10:05 PM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
what happens when you use the command you said ?
you can't just say it doesn't work, cause we need to know errors, etc ... to help you
resolve this ..
 
Old 02-25-2004, 10:12 PM   #3
mschua44
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Original Poster
Rep: Reputation: 0
something like invalid command or gcc command not exist.
 
Old 02-25-2004, 10:14 PM   #4
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
well then you have to install the gcc package
but to double check you can see if you do have it :
ls -alc /usr/bin/gcc*
 
Old 02-25-2004, 10:14 PM   #5
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
*edit*
damnit double posted ..
my bad ..
 
Old 02-25-2004, 10:51 PM   #6
mschua44
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Original Poster
Rep: Reputation: 0
where can i download the gcc package? izit gcc package include the
execute function for the c program ?
 
Old 02-26-2004, 12:41 AM   #7
Oddball79
Member
 
Registered: Aug 2003
Posts: 68

Rep: Reputation: 15
gcc is included in the download version of Mandrake 9.2. You can go to install new software and search for it and all the libraries that you need and install them. If you can't find the particular lib that you need to can always do a google search for it.
 
Old 02-26-2004, 11:13 AM   #8
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 60
and gcc compiles your source code and makes your executable file ..
gcc test.c
will output a file called a.out
gcc test.c -o test
will output a file called test

a.out and test would both be the executables in these examples ...
if you actually think of what you asked, then you would already have had your answer ..
do you think you were going to actually download a compiler that doesn't compile your programs ?
 
  


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
How to compile and run a java program in linux !!!! jmax24 Programming 7 08-06-2010 03:56 AM
compile java program under mandrake 10.1 wakemeup Linux - Laptop and Netbook 2 11-30-2004 08:56 AM
How to compile and run my first program vanhelsing Programming 2 07-11-2004 02:41 PM
Can I Run A Windows Based Dial Up Program With Mandrake 9.2 ARTE49 Linux - Newbie 1 03-07-2004 05:56 AM
I want to run a program designed for windows on Linux Mandrake. serkanyavas Linux - Laptop and Netbook 2 10-06-2003 09:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 09:16 AM.

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