Linux timer functions

This is a discussion on Linux timer functions within the C Programming forums, part of the General Programming Boards category; Hi all In my application I'm using timer_create() & timer_settime() functions of linux. but while compiling it gives me undefined ...

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    25

    Linux timer functions

    Hi all

    In my application I'm using timer_create() & timer_settime() functions of linux.
    but while compiling it gives me undefined reference for these two functions. I think I need to include some library while compiling....but I donno which library should be included while compiling (using gcc). [I have included <time.h> header file in my application]
    please comment....


    thanks & regards
    onebrother

  2. #2
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Are you including signal.h as well?

    See the man pages for more information on those functions.

  3. #3
    Registered User
    Join Date
    Mar 2007
    Posts
    25

    Linux timer functions

    Yes I have included <signal.h> also

  4. #4
    Registered User
    Join Date
    Mar 2007
    Posts
    25

    Linux timer functions

    it should be

    gcc -lrt <filename>.c

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 7
    Last Post: 11-17-2008, 01:00 PM
  2. Timer in Linux
    By mc99044 in forum C Programming
    Replies: 1
    Last Post: 07-20-2004, 09:42 AM
  3. Linux API functions
    By Micko in forum Linux Programming
    Replies: 3
    Last Post: 07-01-2004, 04:39 PM
  4. Linux? Windows Xp?
    By VooDoo in forum Linux Programming
    Replies: 15
    Last Post: 07-31-2002, 09:18 AM
  5. linux vs linux?
    By Dreamerv3 in forum Linux Programming
    Replies: 5
    Last Post: 01-22-2002, 09:39 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21