I'm having some problems compiling CUnit 2.1 .
I've downloaded the version from sourceforce although I guess there is nothing wrong with the version in the repositrys.
I'm trying to compile one of the examples (CUnit-2.1-0/Examples/AutomatedTest) via,
Code:
gcc AutomatedTest.c -lcunit -I ../ -I /usr/local/include/CUnit/
Where ../ is for ExampleTests.h
/usr/local/include/CUnit/ is for the headers
and libcunit.a is in /usr/local/lib/libcunit.a
The error I'm getting is,
Code:
/tmp/cco3A09O.o: In function `main':
AutomatedTest.c:(.text+0x180): undefined reference to `print_example_results'
AutomatedTest.c:(.text+0x1c5): undefined reference to `AddTests'
collect2: ld returned 1 exit status
So I've had a look for both these functions, they are in ExampleTests.h which is included via AutomatedTest.c .
So I don't get why its not compiling? Ideas?
Thanks.
Bookmarks