Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 07-22-2006, 06:36 PM   #1 (permalink)
 
Ultra Techie

Join Date: Apr 2005

Posts: 950

M4A1 is on a distinguished road

Send a message via AIM to M4A1
Default Installing Compiler?

Ok, I'm starting my C++ class in college.

My professor recommended that I use "GCC, the GNU Compiler Collection", instead of MSVS. I have no idea to go about installing this... can anyone help me?

Also, is this a "compiler", like Borland or MSVS C++ Compiler, or what? I unpackaged the gcc-4.1.1.tar.bz2 and I have a ton of files.
M4A1 is offline  
Old 07-23-2006, 01:02 AM   #2 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default

MSVS is an IDE. GCC is not an IDE. It is strictly a compiler -- a program that translates your source code into machine language. It is for Linux, but I believe the Windows port is called mingw. Anyhow, after you have created your c++ source file, you call the compiler from the command line. MSVS does all this for you, while providing an editor and a nice graphical user interface. I think it's good practice to learn to use the command line when starting out, so that very little is hidden by an IDE.
jaeusm is offline  
Old 07-23-2006, 09:10 AM   #3 (permalink)
 
Ultra Techie

Join Date: Apr 2005

Posts: 950

M4A1 is on a distinguished road

Send a message via AIM to M4A1
Default

Quote:
Originally posted by jaeusm
MSVS is an IDE. GCC is not an IDE. It is strictly a compiler -- a program that translates your source code into machine language. It is for Linux, but I believe the Windows port is called mingw. Anyhow, after you have created your c++ source file, you call the compiler from the command line. MSVS does all this for you, while providing an editor and a nice graphical user interface. I think it's good practice to learn to use the command line when starting out, so that very little is hidden by an IDE.
So, basically I'm writing my code in notepad, then calling it from the command line? By any chance, do you know how to do that? If I use MSVS, it will be the same output, just different method of getting the programr running. Also, is there anythying else otherthan MSVS that you might recommend? I've used Borland before, but that was a while ago - I don't know if much has changed with that.
M4A1 is offline  
Old 07-23-2006, 11:17 PM   #4 (permalink)
 
True Techie

Join Date: May 2006

Posts: 150

fjf314 is on a distinguished road

Send a message via AIM to fjf314
Default

Personally, I would recommend using a text editor that still has C++ support, just to make your life a little easier. I would try to find one that will still do things like use different colors for various specifics in your code, keep your indenting set up, etc. I personally use TextPad, but I program with Java. I don't know how great the support is for C++. I'm sure someone here who actually codes with C++ regularly could tell you what the best editor to use is.

But yes, you have the right idea. You will write your code in a text editor of your choice, then from the command line compile and run your code. I don't know what command you would have to use to compile or run your code, but I'm sure if you look on the site for the compiler or some of the documentation that may have come with it, it will tell you how.

Edit: Steps 5 and 6 on this page tell you how to compile and run programs with the MinGW compiler.
__________________
There are 10 kinds of people in the world, those who understand binary and those who don\'t.
fjf314 is offline  
 
Closed Thread

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