CppUTest Compilation Environment

Here are some of the supported CppUTest development environments.

Linux

Linux by default supports the gcc command to invoke the GNU C compiler. To use CppUTest, you need g++, GNU's C++ compiler. g++ is not installed by default in all Linux distributions. You can load the tools easily enough using the apt-get command. Superuser capabilities are needed, so you would enter this command:

sudo apt-get install g++

Some Linux distributions have only limited C support and may require you to installbuild-essential using this command:

sudo apt-get install build-essential

You can also install g++ using graphical package management software like Synaptic or Ubuntu Software Center

Apple Macs - OSX X Code

Mac OS X's Xcode development environment includes the GNU tool chain. If you have not already done it, install Xcode from the distribution CDs or download it from Apple.

Windows

For Windows development environments, there are a few GNU tool chain choices: Cygwin, MinGW+MSYS, and a virtual machine (VM) running Linux. The easiest to set up is Cygwin, a Unix command-line environment. A virtual machine running Linux is another alternative, but it's more work to set up. Some TDD practitioners have reported that they have a tenfold speed advantage with the Linux VM. So, start with Cygwin or MinGW, but plan on moving to a VM running Linux when test runs become too slow.

Cygwin and MinGW+MSYS offer similar capabilities but with different licensing. Licensing is not an issue for using the tools as a test environment. Aside from the gcc compilation environment, you get a Unix command-line environment, giving you powerful scripting environment for automating repetitive tasks.

Cygwin

For Cygwin, you can download the installation file. Install the Default packages plus the Devel package. This will use about 500MB on your hard drive and take some time depending upon your download speed. Cygwin is a bit slow, but you can have a development system--based test environment up and running in a morning.

MinGW+MSYS

MinGW+MSYS is another windows GCC option. I've had some trouble setting up MinGW+MSYS, so I usually steer people to Cygwin.

Virtual Machine with Linux

For Linux virtual machine approach on Windows, first you need to install a virtual machine. VirtualBox is open source. There are others to buy. Then you can install a Linux distribution such as Ubuntu. Plan on dedicating a gigabyte of RAM to the virtual machine. You will need to install g++ once you have installed Ubuntu.

Microsoft Visual Studio

Visual Studio is another option. Make sure your version of Visual Studio supports a command-line build. A command-line build is important so that the build can be automatically run by a continuous integration server, such as Hudson. There are various Visual C++ workspace and project in the CppUTest.