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 ...
- 09-10-2010 #1Just 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
- 09-13-2010 #2Linux Newbie
- Join Date
- Mar 2010
- Posts
- 121
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.
- 09-13-2010 #3Just 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.


Reply With Quote