Clock Gettime Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of undefined reference to clock_gettime' in c this site About Us Learn more about Stack Overflow the company Business Learn
Centos Undefined Reference To `clock_gettime'
more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Undefined Reference To Clock_gettime Cmake
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Ubuntu
Undefined Reference To Clock_gettime' Makefile
Linux C++ error: undefined reference to 'clock_gettime' and 'clock_settime' up vote 116 down vote favorite 14 I am pretty new to Ubuntu, but I can't seem to get this to work. It works fine on my school computers and I don't know what I am not doing. I have checked usr/include and time.h is there just fine. Here is the code: #include
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other cmake lrt Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social clock_gettime windows Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu cmake librt Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Packaging and Compiling Programs [SOLVED] undefined reference to `clock_gettime' -lrt http://stackoverflow.com/questions/2418157/ubuntu-linux-c-error-undefined-reference-to-clock-gettime-and-clock-settim Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Results 1 to 3 of 3 Thread: undefined reference to `clock_gettime' -lrt Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode October 27th, 2011 #1 https://ubuntuforums.org/showthread.php?t=1870586 remusmp View Profile View Forum Posts Private Message First Cup of Ubuntu Join Date Feb 2008 Beans 4 undefined reference to `clock_gettime' -lrt Hi, I am trying to compile a simple C file (taken from maple15) with the following commands: MAPLE=/usr/local/bin/maple15 export LD_LIBRARY_PATH=$MAPLE/bin.IBM_INTEL_LINUX gcc simple.c -I$MAPLE/extern/include -L$MAPLE/bin.IBM_INTEL_LINUX -o simple -lmaplec -lrt ...and I get an error: /usr/local/bin/maple15/bin.IBM_INTEL_LINUX/libmaple.so: undefined reference to `clock_gettime' collect2: ld returned 1 exit status Why do I get an undefined reference to clock_gettime? I do have -lrt as an option to gcc (I also tried to put -lrt before -lmaplec). I don't think the error is related to Maple commands. I am compiling under Kubuntu 11.10, 32bits. Regards, Remus. Adv Reply October 27th, 2011 #2 MadCow108 View Profile View Forum Posts Private Message I Ubuntu, Therefore, I Am Join Date Apr 2009 Location Germany Beans 2,134 DistroUbuntu Development Release Re: undefined reference to `clock_gettime' -lrt libmaple is underlinked, meaning it is not linked against all libraries whos symbols it needs. This makes it hard to link it with --as-needed http://wiki.mandriva.com/en/Underlinking This is a bug you should report. you will ha
Support Search GitHub This repository Watch 11 Star 232 Fork 16 naelstrof/slop Code Issues 11 Pull requests 1 Projects 0 Pulse Graphs New https://github.com/naelstrof/slop/issues/13 issue "undefined reference to `clock_gettime'" when trying to compile slop on Ubuntu 12.04 #13 Closed Glutanimate opened this Issue Oct 26, 2014 · 7 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 2 participants Glutanimate commented Oct 26, 2014 Hey, first of all thanks a lot for this project. Scrot has been giving me undefined reference headaches with its selection artifacts and I am very glad to have stumbled on slop. Unfortunately I've been struggling with compiling your project on my system. make consistently fails with an undefined reference toclock_gettime'error. For what it's worth, this is the output I get forcmakeandmake`: $ cmake ./ -- The C compiler identification is GNU 4.6.3 -- The CXX compiler identification undefined reference to is GNU 4.6.3 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/g++ -- Check for working CXX compiler: /usr/bin/g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done Command gengetopt or sed not found! Won't regenerate command line code. Replacing version in readme... -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so -- Configuring done -- Generating done -- Build files have been written to: /home/glutanimate/slop $ make Scanning dependencies of target slop [ 25%] Building C object CMakeFiles/slop.dir/src/cmdline.c.o [ 50%] Building CXX