Fix for “undefined reference to clock_gettime”

While running the script for SIPp I ran into this error:

src/sipp-time.o: In function getmicroseconds()': /chroot/root/sipp/src/time.cpp:57: undefined reference to clock_gettime'

The fix is to add LDFLAGS=”-ltr” like so:

LDFLAGS=" -lrt " ./configure --with-openssl --with-pcap --with-sctp --with-rtpstream

LDFLAGS=" -lrt " make

More information about this error: Ubuntu Linux C++ error: undefined reference to ‘clock_gettime’ and ‘clock_settime’; Untitled; [xymon] Can not compile 4.2.3 on CentOS 5.2

Comments are closed.

%d bloggers like this: