Build

These instruction assume you are using cygwin, but should work for linux or unix.

To set up cygwin, download and install it from www.cygwin.com. Make sure the cygwin bin directory is in the windows path.

From a cygwin prompt
The -r switch makes the tests run twice. The summary for the second run of the tests should show OK
The first run shows some memory leaks, but we can disregard them. The are due to library routines that do not cleanup after them selves immediately (if at all).

Bonus

To make NewClass from the cygwin prompt create a link to the NewClass shell script as follows

Your Project Directory

Create a directory to hold your project, for example c:Projects/eclipse/MyProject
You will put your makefile and your source code into this directory

Your makefile

Here is a simple makefile to serve as a starting point..
TARGET = TestMain

LOADLIBS =\
 -lUnitTestHarness\
 -lGccPlatform\
 -lstdc++ 

LIBDIRS =\
 -L$(CPP_TEST_TOOLS)/lib

INCLUDE = -I$(CPP_TEST_TOOLS)

CPPFLAGS = $(INCLUDE)

.cpp.o : 
	gcc -c $(CPPFLAGS) -o $@ $<

DOTO = 

test: $(TARGET)
	./$(TARGET) 

all: 	$(DOTO) $(TARGET) 


$(TARGET): $(TARGET).o $(DOTO) 
	$(CC) -o $(TARGET) $(LIBDIRS) $^ $(LOADLIBS)

clean:	
	rm -f *.o $(TARGET).exe


Unit test main

Create a TestMain.cpp and copy this code into it
#include "UnitTestHarness/CommandLineTestRunner.h"

int main(int ac, char** av)
{
  CommandLineTestRunner::RunAllTests(ac, av);

  return 0;
}

Build it and see that you get this result

OK (etc)