I'm trying to set up CUnit for use on Red Hat Enterprise Linux. This is my test file in c:
#include <CUnit/CUnit.h>
int main() {
return 0;
}
At first, I was getting an error when using gcc cunit-test.c -lcunit
:
/usr/bin/ld: cannot find -lcunit
collect2: error: ld returned 1 exit status
So I made a symlink so that /usr/lib64/libcunit.so
points to /usr/lib64/libcunit.so.1
, which fixed that error.
However, I'm still not able to use the CUnit files. When I compile my test file, with gcc cunit-test.c -lcunit
I get the error
cunit-test.c:1:10: fatal error: CUnit/CUnit.h: No such file or directory
#include <CUnit/CUnit.h>
^~~~~~~~~~~~~~~
compilation terminated.