#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
/* A test case that does nothing and succeeds. */
static void null_test_success(void **state) {
(void) state; /* unused */
}
int main(void) {
const UnitTest tests[] = {
unit_test(null_test_success),
};
return run_tests(tests);
}
I am new to cmocka unit testing framework, http://www.ohloh.net/p/cmocka. When I compiled the above program as gcc program.c -lcmocka and when i ran ./a.out I got the error:
./a.out:error while loading shared libraries: libcmocka.so.0: cannot open shared object file: No such file or directory
I tried but cannot fix it. What exactly is the problem here?
can you check if you have permission to access the folder /usr/local/lib/
Do a ls -lart /usr/local/lib/libcmocka.so and check for the access permission and check if you have read permission
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With