Sunday, September 13, 2009

New Software Development Process, Part 2 - Installing the Compiler Tools

In my next set of blog entries, I will describe the steps I took to install the tools for the new software development process. The first set of tools that I installed are my compiler tools.

I already have Microsoft Visual Studio 2005. For those of you who want to employ the same software development process and don't have Microsoft Visual Studio 2005, you can download a free copy of Microsoft Visual C++ 2008 Express Edition at:
http://www.microsoft.com/express/vc/

These steps are the ones I took to install the GCC MinGW compiler tools on our Windows/x86 platform. Be aware that I chose to use the 2-step installation process:

1) download the software
2) install the software

In the most common installation process, downloading and installing the software is done in one (1) step.

I chose to the 2-step process because I was installing the software on more than one machine. The 2-step process allows me to download the software once for all the machines instead of once for each machine.


First, I created the top-level folder
C:\SWDevTools


Then, I created the second-level folder
C:\SWDevTools\MinGW


I created the sub-folder
C:\SWDevTools\MinGW\download


I created the second-level folder
C:\SWDevTools\MSys


I created the sub-folder
C:\SWDevTools\MSys\download


Using my web browser (Mozilla Firefox), I went to
http://sourceforge.net/projects/mingw/files/

I scrolled down to the item called "Automated MinGW Installer" which has the sub-item "MinGW 5.1.6".


I clicked the sub-item "MinGW 5.1.6" to reveal the sub-items "MinGW-5.1.6.exe"
and "MinGW-5.1.6.exe-src.tar.lzma"

I downloaded MinGW-5.1.6.exe (installer app) to
C:\SWDevTools\MinGW\download

I went back to
http://sourceforge.net/projects/mingw/files/

I scrolled farther down to the item called "MSYS Base System" and clicked on it to reveal the several sub-items. I clicked on the sub-item "Current Release_MSYS-1.0.11" to reveal several sub-items.

I downloaded MSYS-1.0.11.exe to
C:\SWDevTools\MSys\download


I scanned the file "MinGW-5.1.6.exe" for viruses and then executed it.

Select "Download only"
Select "Current" MinGW package

Select the following components to download:

MinGW base tools
g++ compiler
Java Compiler
Objective C Compiler
MinGW Make


I scanned the downloaded files for viruses and then copied them to each PC, that I want to install the development environment, using the same directory structure

C:\SWDevTools\MinGW\download

On each PC, I execute MinGW-5.1.6.exe, again.

Select "Download and install"
Select "Current" MinGW package

Select the following components to download:

MinGW base tools
g++ compiler
Java Compiler
Objective C Compiler
MinGW Make

Specify the following "Destination Folder"

C:\SWDevTools\MinGW


After installing MinGW, I set the environment variable

MINGW

to

C:\SWDevTools\MinGW


Then, I added, to the environment variable, "path", the following:

C:\SWDevTools\MinGW\bin

To test the installation of MinGW, I built the following "Hello World" program using the MinGW C++ compiler.

#include
int main ( int argc , char* argv [] ) {
int inputkey ;
printf ( "Hello World!\n\n" ) ;
printf ( "" ) ;
inputkey = getchar () ;
return 0 ;
} ;

I use the following commands to create the source file.

mkdir C:\SWDevTools\MinGW\test

notepad C:\SWDevTools\MinGW\test\HelloWorld.cpp


I use the following command to build the executable. (all on one line)

g++ C:\SWDevTools\MinGW\test\HelloWorld.cpp -oC:\SWDevTools\MinGW\test\HelloWorld.exe

Double clicking on HelloWorld.exe results in the following output:

Hello World!




MinGW was installed successfully.


No comments: