Content of this page.
PC: Borland C++ version 3.1, 1990-1992.
(This PC compiler is about the age of DOS 5 or Windows 3.1, so you won't find this in the current market any more. Read on below about the retro-compatibility of the C compiler.)
MAC: Metrowerks CodeWarrior IDE version 3.0, 1993-1998.
(This compiler is used for Classic Macintosh C Codes. Like Borland C++ 3.1, you no longer find it in the market.)
MAC_OSX: Apple's version of GCC-3.3, GNU Project, circa 2003.
Linux: GCC-2.0, GNU Project, circa 1992 (in Redhat Linux 6.2); OR
Unix: GCC-2.95.3, GNU Project, circa 1995 (in Sun Solaris 8); OR
For this kind of tiny C-codes programming, you may not want to purchase an expensive C-Compiler from the market. Here is my experience of getting a free C Compiler which is available at "http://gcc.gnu.org".
First, don't try to build a GCC compiler from their original source C-codes found in GNU (G Not Unix!) Web site. The GCC compiler itself is a big software package which is written also in C. Although GNU offers the entire source codes of GCC package, your first dilemma is like this: Gee! I don't have any C-compiler at my hand, that is why I want to get a free-one. How may I possibly make up one working C compiler just from the C-codes without a C-compiler? This is a bad circle of the chain and there is no way out.
Here comes the news from heaven: you can copy and install the pre-compiled binary GCC compiler which is already made up by someone at one of PC_Linux_Mac platforms as the working GCC compiler. Go for it and get it, because GNU expect you will do that. The below I describe two cases from my limited experience: Redhat Fedora Core Linux and SUN Solaris 10 Unix. And just a screen shot of SUSE 10.
Fedora Core (Redhat Linux)
One of the easiest ways to get free and working GCC compiler is that you will establish Redhat Linux Operating System by converting one of your PCs. I have Redhat Linux 6.2 (circa 1998, I bought it at Staples), and then I have Fedora Core Project (FC-1 Yarrow; FC-4 Stentz, these are names of Operating System). All of these Redhat's Linux OS offer a built-in C Compilers of GCC. They may not be sharp like Windows OS, but when it comes to a functional C compiler and PERL interpreter without any hassle, they are fantastic. In the case of the Fedora Core OS, I downloaded its image files as .ISO format, and installed it onto one of my PC, converting from Windows OS to Linux OS. Here are the steps,
Downloading and installation of Fedora Core OS
- Go to distrowatch (http://distrowatch.com) (< distribution watch). You will see which brand name of Linux OS is popular and the favorite downloads among people. You will see Fedora Core in the top ten among the ranking chart.
- Do downloading (or FTP, file transfer protocol) from mirror sites and get the 3 CD images of FC-1 (.iso file) or 4 CD images of FC-4.
- Burn the CD image files by using Nero 6 or alike (a CD burning software). Make sure they are burnt as .iso file, not as the data file.
- Place the first CD disk onto a Compaq or Hewlett Packard brand PC, which you are O.K. to erase all data and Windows OS (other brand PC, you do it at your own risk, I mean, successful chances of loading are 50:50%). Start the power. If the PC doesn't start up reading from the CD disk, adjust the BIOS to start from CD drive. Economical second-hand Compaq or Hewlett Packard PC is available such as DollarComputer (www.dollarcomputer.com). [Media Test - PASS or FAIL] at the beginning of OS loading tells you whether your PC is compatible with the loading FC or not, so make sure to do it. That saves your time.
Follow the instructions. Somewhere at the initial setup options, it will ask which packages you need to install. Make sure to select the Development Tools (gcc, perl, etc.). The entire Fedora Core OS loading takes about 1 to 2 hours. That's it, now you have the brand new C compiler and PERL interpreter at your hand.
- Do $ 5.00 donation to either GNU, PERL, or Redhat_Fedora_Core_Project, if you like it.
Solaris 10 (SUN Unix)If you have grown up with SUN in an university and like SUN, you may setup a SUN hardware with GCC and PERL. When you use a SUN hardware not for networking purpose but for these development suit, it is out of focus but it's O.K.
They have similar steps like Fedora Core Linux above, such as OS downloading, burning them to CD disks, and installation of the OS.
Downloading and installation of Solaris 10 OS onto a SUN hardware
- Go to SunFreeware (http://www.sunfreeware.com). At the right side of the page, you will see about 6 versions of Solaris releases in two kinds of CPU types, SPARC and Intel(x86). Go for Solaris 10, the recent release, since it works fine. As for the hardware, I only have experience of SPARC. Since SUN traditionally sells their Solaris OS with their proprietary hardware together, I prefer to load the Solaris 10 OS onto the SUN hardware. If you want to get the SUN hardware by economy budget, do a rummage sale search in eBay (approximately budget around $ 100 to $ 200; I bought Ultra Sparc 5 at $ 100 in 2005). I don't have experience to load Intel version Solaris to any Intel-inside PC.
- Do downloading to get the 4 CD images of Solaris 10 (.iso file format).
- Burn the CD image files by using Nero 6 or alike (a CD burning software).
- Place the first CD disk into a SUN hardware. Start the power. At the ok-prompt,
ok boot cdrom
The installation of Solaris 10 begins. The most critical step for setting up the successful GCC and PERL is to set the Solaris 10 on SUN as relatively advanced user privilege such as,
Choice of Operating Environment = Entire OR = Developer x (not End_User)At the End_User setting, you won't get PERL nor a good environment for GCC. Must be Developer or Entire setup. The entire Solaris 10 OS loading takes about 1 to 2 hours. Now you have the PERL interpreter at your hand. But for GCC C compiler, you have to do one more step. You will add a few pre-compiled packages manually.
Download the pre-compiled GCC for Solaris 10 from the SunFreeware (http://www.sunfreeware.com). Perhaps, all you need is libiconv and gcc, but I follow the comment from Experts-Exchange.Com and load the four auxiliary files always. Download below (version number may change time to time) and burn them on a CD as data files.
gcc-3.3.2-sol10-sparc-local.gz (80 MB) gdb-6.6-sol10-sparc-local.gz ( 4 MB) libgcc-3.3-sol10-sparc-local.gz ( 4 MB) glib-2.13.0-sol10-sparc-local.gz ( 4 MB) libiconv-1.11-sol10-sparc-local.gz ( 2 MB)
Copy the files to your home/bin/. Do unwrapping the files at user_level,
> gunzip libiconv.gz > gunzip libgcc-3.gz > gunzip glib_2_1.gz > gunzip gdb_6_6_.gz > gunzip gcc_3_3_.gz
Do package addition of those files at root_level (administrator). Perhaps, you need to start from the dependency file libiconv first.
> su # cd /export/home/username/bin/ # pkgadd -d libiconv # pkgadd -d libgcc-3 # pkgadd -d glib_2_1 # pkgadd -d gdb_6_6_ # pkgadd -d gcc_3_3_The C compiler gets working. Package addition is the SUN's way of loading pre-compiled binary into the computer. In Redhat, the package addition is called RPM (redhat package manager).
- Do $ 5.00 contribution to either GNU, PERL or SunFreeware.
SUSE 10 (Linux OS sponsored by Novell)
Although I haven't used much, I heard a very good reputation of this Linux release, thus here is the screen shot of it. A big company, Novell, Inc. , is behind, so you can rely on it. All setup procedures, many available applications including GCC C compiler and PERL are the exact same situtation as Fedora Core, so I don't repeat that. SUSE also has the media check step at the beginning of loading which tells the compatibility between a PC and OS, so you should do the test during your first attempt.
Ubuntu (for ThinkPad users)
[Added Note on January 2008] I have a good news for ThinkPad users of IBM_Lenovo. In general, ThinkPad(s) aren't compatible with Fedra Core, SUSE above. However, I found it is compatible with Ubuntu release of Linux. Ubuntu Desktop OS version also comes with GCC compiler and PERL interpreter. By my limited test, Ubuntu is a little rough in terms of smooth runing of applications. While it appears wonderful, if your PC failed the media test [compatibility test] of Fedora Core and SUSE. Ubuntu likely works. Picture below is ThinkPad A20m.