LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 12-22-2001, 09:11 AM   #1
collinss
LQ Newbie
 
Registered: Dec 2001
Distribution: RedHat 7.1
Posts: 2

Rep: Reputation: 0
POSIX.4 clock_gettime function


I am trying to use the clock_gettime function but I get an "undefined reference" error when building. I have included time.h, my computer is POSIX.1 and POSIX.4 compliant, and _POSIX_TIMERS is defined. What am I missing or what else do I need to verify?
 
Old 12-22-2001, 01:00 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 194Reputation: 194
double post.. please try to refrain from double posting. http://www.linuxquestions.org/questi...threadid=10522
 
Old 09-13-2005, 06:55 AM   #3
karthiks
LQ Newbie
 
Registered: Sep 2005
Distribution: RedHat
Posts: 1

Rep: Reputation: 0
clock_gettime error

append -lrt to the gcc commandline. seems clock_* are in a library called 'librt'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what are the Hexadecimal function and ASCII function in Perl Bassam Programming 1 06-03-2004 01:44 AM
A main can be changed by a function local without passing anything to the function? ananthbv Programming 10 05-04-2004 01:31 PM
Is the wait function is the same as the sleep function ? Linh Programming 3 04-28-2004 12:39 PM
Perl exec function in linux (and system-function) nazula Programming 1 04-19-2004 12:21 PM
POSIX.4 clock_gettime function collinss Linux - General 1 11-24-2003 12:12 PM


All times are GMT -5. The time now is 02:58 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration