Hi Christian,
Thank you for your reply.
(1) 'pthread_cancel' exists in our old sdk, we must have it.
(2) How to resolve: undefined reference to `mq_*' ?
(3) Our old sdk seems to have to use ''__errno_location',
Best Regards,
Tony
On 11月26日, 下午5时42分, Christian Linne <
christian.li...@googlemail.com>
wrote:
> (1) 'pthread_cancel' isn't implemented, and you should avoid to use it if
> possible - it leaves the thread in an undefined state, used resources
> aren't freed, etc. Setting up a condition to let the thread run out should
> be preferred.
>
> (2) librt.so cannot be found because it's not in the NDK. I don't know if it
> will ever be.
>
> (3) Haven't found '__errno_location' anywhere in the NDK, so it's not
> surprising the linker complains about it.
>
> 2010/11/26 Tony Jiang <
tonyjiang2...@gmail.com>
>
>
>
> > Hi,
>
> > Here are some link errors in Android NDK. They are about pthread and
> > librt:
> > core_thread.c:(.text+0x13d4): undefined reference to `pthread_cancel'
> > core_queue.c:(.text+0x298): undefined reference to `mq_timedreceive'
> > core_queue.c:(.text+0x2a0): undefined reference to `__errno_location'
> > core_queue.c:(.text+0x390): undefined reference to `mq_close'
> > core_queue.c:(.text+0x3bc): undefined reference to `mq_unlink'
> > core_queue.c:(.text+0x4e8): undefined reference to `mq_timedsend'
> > core_queue.c:(.text+0x4f4): undefined reference to `__errno_location'
> > core_queue.c:(.text+0x96c): undefined reference to `mq_open'
>
> > Do I need to implement "pthread_cancel"?
> > How about "__errno_location"?
> > For mq_*, I add LOCAL_LDLIBS := -lrt, but ld don't find librt.
>
> > Regards,
> > Tony
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-ndk" group.
> > To post to this group, send email to
andro...@googlegroups.com.
> > To unsubscribe from this group, send email to
> >
android-ndk...@googlegroups.com<
android-ndk%2Bunsu...@googlegroups.com>
> > .
> Mail (private):
linne2...@aol.com
> Mail (official):
Christian.Li...@googlemail.com,
> ICQ: 293253013