LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-11-2006, 05:00 AM   #1
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,477

Rep: Reputation: 51
How to run my compiler


Hi everyone,

I am new to Linux and I am attempting to teach myself to write code in C++. I am doing this with various books which are clear in their teaching of code writing, but seem to assume I already know how to use a compiler.

I am doing the practice exericises using the KDevelop/C++ compiler and can't seem to work it out. The manual isn't much help.

My question is: Can anyone tell me some very very basic things?

1. Once I have written the code and saved it *.cpp in a text editor, what is the first three or four specific steps to do in the compiler before I try to build it?

2. Is there a free compiler available that is written for beginning learners like me that I could use, which may be more straightforward while I am learning?

Learning this without a classroom environment is more difficult than I thought it would be, but I think I could do it if I can work this darn compiler out.

Any help very much appreciated.

Bob

Using FC4 (2.6.11), AMD64 3400+, 1.5G mem, dual boot with windows
 
Old 01-11-2006, 06:32 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
1. why are you expect three or four steps?? the most basic usage would be "g++ file.cpp -o file"

2. this is linux, the g++ compiler IS free. most likely every single piece of software running on your system has been compiled with gcc and g++.

Last edited by acid_kewpie; 01-11-2006 at 06:33 AM.
 
Old 01-11-2006, 07:11 AM   #3
BobNutfield
Senior Member
 
Registered: Dec 2005
Location: United Kingdom
Distribution: Fedora , Ubuntu, Slackware-Current
Posts: 1,477

Original Poster
Rep: Reputation: 51
Sorry, I guess it was a silly question, but it shows just how inexperienced at this I am.

Thank you for your help.

Bob
 
  


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
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 12:35 PM
error: "c compiler cannot create executables" when trying to run ./configure fedoraemu Linux - Software 2 04-24-2007 07:43 PM
Will C++ Application run in computer without gcc c-compiler srivembu Linux - General 4 09-03-2005 10:20 AM
C compiler cannot run C compiled programs petero Programming 8 05-27-2005 11:35 AM
how do i run my c compiler fhameed Linux - Software 2 11-16-2003 11:06 AM

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

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