Step 1: Download CUnit package from Source Forge.
Step 2: Find where you saved the package on your system, and uncompress it:
Code:
tar xjf CUnit-2.1-2-src.tar.bz2
Step 3: Go into the CUnit-2.1.2 directory.
Step 4: Run the following sequence of commands:
Code:
mkdir -p $HOME/local
./configure --prefix=$HOME/local
make clean
make
make install
Step 5: Goto the directory $HOME/local. Verify that you have the following sub-directories: doc, include, lib, and share. Each of these should have the products you seek.
Step 6. To build an application using CUnit, something like this is used:
Code:
gcc -Wall -I$HOME/local/include MyProg.c -L$HOME/local/lib -lcunit -o myprog
Note: In your source code, include CUnit header files such as:
Code:
#include <CUnit/CUnit.h>
...
Bookmarks