Installing Compiler?

Status
Not open for further replies.

M4A1

Daemon Poster
Messages
957
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.
 
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 said:
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.
 
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.
 
Status
Not open for further replies.
Back
Top Bottom