Closed cpierret closed 4 years ago
I know CentOS6 is not very current, but I needed to add the -lrt flag to linker in projects/make/Makefile otherwise I would get undefined reference to `clock_gettime' errors.
As in:
diff --git a/projects/make/Makefile b/projects/make/Makefile index f7b14dd..2e79ff2 100644 --- a/projects/make/Makefile +++ b/projects/make/Makefile @@ -30,7 +30,7 @@ clean: rm -f build/ClangBuildAnalyzer $(C_OBJS) $(CPP_OBJS) build/ClangBuildAnalyzer: $(C_OBJS) $(CPP_OBJS) - $(CXX) -o $@ $(C_OBJS) $(CPP_OBJS) $(LDFLAGS) -lpthread + $(CXX) -o $@ $(C_OBJS) $(CPP_OBJS) $(LDFLAGS) -lrt -lpthread build/%.o: %.c mkdir -p $(dir $@)
Thanks! Added link to rt to both the makefile & cmake script
rt
I know CentOS6 is not very current, but I needed to add the -lrt flag to linker in projects/make/Makefile otherwise I would get undefined reference to `clock_gettime' errors.
As in: