Ubuntu – Install CUnit

To use CUnit framework in your project, you must install it first

sudo apt-get install libcunit1 libcunit1-doc libcunit1-dev

Then in your test.c

#include <CUnit/CUnit.h>

And finally, you must add the flag –lcunit to the gcc command (at the end)

 
gcc  -o test test.c  -lcunit
Advertisements