$ gcc -lm -lrt -lpthread tests/main.o tests/ptest_list.o tests/utils.o utils.o ptest_list.o -o ptest-runner-test -lcheck /usr/local/lib/libcheck.a(check.c.o): In function `tcase_create': /home/edavnys/check/src/check.c:145: undefined reference to `floor' /home/edavnys/check/src/check.c:148: undefined reference to `floor' //usr/local/lib/libcheck.a(check.c.o): In function `tcase_set_timeout': /home/edavnys/check/src/check.c:332: undefined reference to `floor' /home/edavnys/check/src/check.c:334: undefined reference to `floor' //usr/local/lib/libcheck.a(check.c.o): In function `check_get_clockid': /home/edavnys/check/src/check.c:616: undefined reference to `timer_create' /home/edavnys/check/src/check.c:618: undefined reference to `timer_delete' //usr/local/lib/libcheck.a(check_run.c.o): In function `tcase_run_tfun_fork': /home/edavnys/check/src/check_run.c:507: undefined reference to `timer_create' /home/edavnys/check/src/check_run.c:515: undefined reference to `timer_settime' /home/edavnys/check/src/check_run.c:529: undefined reference to `timer_delete' collect2: error: ld returned 1 exit status
Signed-off-by: Jiwei Sun <[email protected]> --- Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 434b89f..3faf2e7 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,7 @@ EXECUTABLE=ptest-runner TEST_SOURCES=tests/main.c tests/ptest_list.c tests/utils.c $(BASE_SOURCES) TEST_OBJECTS=$(TEST_SOURCES:.c=.o) TEST_EXECUTABLE=ptest-runner-test -TEST_LDFLAGS=-lm -lrt -lpthread -TEST_LIBSTATIC=-lcheck +TEST_LIBSTATIC=-lcheck -lrt -lm -lpthread TEST_DATA=$(shell echo `pwd`/tests/data) @@ -34,7 +33,7 @@ $(EXECUTABLE): $(OBJECTS) tests: $(TEST_SOURCES) $(TEST_EXECUTABLE) $(TEST_EXECUTABLE): $(TEST_OBJECTS) - $(CC) $(LDFLAGS) $(TEST_LDFLAGS) $(TEST_OBJECTS) -o $@ $(TEST_LIBSTATIC) + $(CC) $(LDFLAGS) $(TEST_OBJECTS) -o $@ $(TEST_LIBSTATIC) check: $(TEST_EXECUTABLE) ./$(TEST_EXECUTABLE) -d $(TEST_DATA) -- 1.8.3.1 -- _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
