Find the answer to your Linux question:
Results 1 to 3 of 3
1. I need to use clock_gettime(), in <time.h> it is: extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; and in a successful build .so it is unsolved. In final ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    13

    how libc is linked in crosscompiler chain?


    1. I need to use clock_gettime(), in <time.h> it is:
    extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW;
    and in a successful build .so it is unsolved.
    In final app to lonk to this .so it is also unsolved. which lib missed in .so or app build?

    2. libc include several libs, which are liked by default? say stdc++, rt? rt1/rt2 what does they do?

    3. how to find which libc is used or linked?
    thanks for help

  2. #2
    Linux Newbie
    Join Date
    Mar 2010
    Posts
    152
    The man page for a function will often tell you what linker options you need to pass. Look-up `man clock_gettime' and you'll see under the function prototypes it tells you to link with -lrt.

  3. #3
    Just Joined!
    Join Date
    Apr 2010
    Posts
    13
    thanks I did added -lrt. I build allmost same lib for x86 and mips. this -lrt works on x86 not mips. checked the librt to see no missing symbol, strange.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •