LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-06-2004, 04:24 PM   #1
laceupboots
Member
 
Registered: Dec 2003
Location: Houston
Distribution: Knoppix,lenova yoga 3, Samsung s6 -android
Posts: 307

Rep: Reputation: 30
How do I run C++?


I got a new computer and Mandrake 9.2 for Christmas. I have a dual boot, because the new comp came with a LT winmodem. Haven't made it to figuring out how to install drivers yet but I will.
I would like to use the C++ that came with Linux. I installed gcc2.96 and glibc. How do I run it? I would like to add it to the menu. I tried Menudrake but the software doesn't show up. I'm very new to Linux and any help would be appreciated. Then we can talk about drivers.........
 
Old 01-06-2004, 04:28 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
You don't run gcc from a menu.... it's a command-line
tool.
you do
g++ <cpp source filename> -o <name of binary execuatable>

There are, however, graphical frontends to it .... kdevelop,
anjuta, ... have a look at http://freshmeat.net to find more.

Or, you can use emacs (vim) and compile from within it.


Cheers,
Tink
 
Old 01-06-2004, 08:25 PM   #3
laceupboots
Member
 
Registered: Dec 2003
Location: Houston
Distribution: Knoppix,lenova yoga 3, Samsung s6 -android
Posts: 307

Original Poster
Rep: Reputation: 30
Thanks Tink. emacs does have a compiler, I don't know how to use it yet but it is there. I tried to install QT but I get an error message that says it cant be installed. I will post the message tomorrow.
 
Old 01-06-2004, 08:36 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by laceupboots
Thanks Tink. emacs does have a compiler, I don't know how to use it yet but it is there. I tried to install QT but I get an error message that says it cant be installed. I will post the message tomorrow.
Try <alt>+x compile :} and then tackle it from there.
I'd recommend using a Makefile, btw.


Cheers,
Tink
 
Old 01-06-2004, 08:57 PM   #5
laceupboots
Member
 
Registered: Dec 2003
Location: Houston
Distribution: Knoppix,lenova yoga 3, Samsung s6 -android
Posts: 307

Original Poster
Rep: Reputation: 30
Quote:
Try <alt>+x compile :} and then tackle it from there.

I will try this. Can you tell me what this does? Does it create the object and Makefile create the executable?
 
Old 01-06-2004, 09:05 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Alt+x compile just opens a shell window within
emacs that will then execute the command you
type in. It defaults to make -f (which is why I
suggested to use a Makefile) ... emacs doesn't
create a Makefile for you. If you only enter
g++ <filename> g++ will create a file named
a.out in the same directory. gcc (g++) by default
doesn't create intermediate files like .o
man gcc
for more detail.


Cheers,
Tink
 
  


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
Cannot get NVIDIA-Linux-x86_64-1.0-6629-pkg2.run to run properly doctorwebbox Linux - Hardware 0 02-06-2005 06:18 AM
Not able to run audio Cds (not MP3) and run VCDS.. satish427 Linux - Newbie 4 09-24-2004 11:27 PM
Trying to run photoshop in wine. Install, but wont run. bruno buys Linux - Software 14 07-15-2004 04:30 PM
will delphi run on winex ? (i cant run kylix3 :(( ) hunter_one Linux - Software 0 10-19-2003 08:41 AM
Java applets run fine in Konqueror, but won't run in MS IE. OAnimal Linux - Software 7 12-04-2002 06:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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