Author Topic: How to install and use GCC (The GNU Compiler Collection) on a Windows machine.  (Read 5505 times)

0 Members and 1 Guest are viewing this topic.

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2129
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
First you need to get MinGW.

http://MinGW.org

When you install this, you should put it into a directory just off the root of your main, boot drive, like this:

X:\MinGW

where X: is the drive letter of your Windows installation.

After you install it, you need to edit your OS environment table.

Right click on My Computer. Go to Properties. Click on the Advanced tab. Click on the button labeled "Environment Variables".

If you have never had any kind of C or C++ compiler on your system before, you will need to add new variables to the environment.

Click on the New button.

Variable name: include
Variable value: X:\MinGW\include

Click on the New button.

Variable name: lib
Variable value: X:\MinGW\lib

Make sure you replace X: with the correcxt driver letter for your Windows installation.

You also need to edit the value of "Path". Select it in the list below and click on the Edit button.

Add this to the beginning of the Variable value: line

X:\MinGW\bin;

Note the semicolon at the end of this statement. Just add this to the beginning and do not remove any other portion of the value of Path. Again, replace X: with the appropriate drive letter.

That's It!  :o :P %) ;) ;D

You now have GCC ready and waiting for you at the command prompt, just like you would on a Linux machine!

Now you need to install Dev-C++ so that you have a nice GUI interface to an Integrated Development Environment for GNU C & C++.

Go here:

http://bloodshed.net/dev/devcpp.html

And get Dev-C++ WITHOUT MINGW!

When you install it, it will find that you already have the most up-to-date version of MinGW (GCC) installed on your Windows machine!

James.  :)
« Last Edit: May 19, 2010, 10:20:40 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

Offline James

  • Administrator
  • Hero Member
  • *****
  • Posts: 2129
  • Milliwatts: 47
  • Gender: Male
    • View Profile
    • LaserBoy !!!
GCC = the Gay Computer Conspiracy!  :-X O0

I can't say more. They will find me and they will kill me.  :o
 
James.  :)
« Last Edit: May 19, 2010, 11:28:38 pm by James »
LaserBoy is Sofa King Cool!
But it will never be Alpha King Done!

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.7 © 2008-2023, SimplePortal