首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

android移植第三方库,找不到pthread,该怎么解决

2012-01-29 
android移植第三方库,找不到pthread第三方库中有pthread的一些接口,但是好像android系统的源码中,没有提供

android移植第三方库,找不到pthread
第三方库中有pthread的一些接口,但是好像android系统的源码中,没有提供POSIX的库。
结果在编译的时候报错:
ld :cannot find -lpthread.

大家是怎么解决的啊?给点意见,谢谢。

[解决办法]
有啊,只是pthread在c库里了,如果我没有记错的话。
[解决办法]
Android runs the Linux kernel, but moves many things around compared to a "normal" desktop Linux distro. In particular, note that Android includes pthread_*()functions within libc, not libpthread, thus the added configure check.
* include/private/gcconfig.h: Android platforms are built atop Linux,
don't use glibc, and uses `environ` instead of `__environ`.
* configure.in: Use AC_CHECK_LIB() to check for pthread instead of
just blindly linking to -lpthread, as Android includes pthread
support within libc and doesn't provide a separate libpthread
[解决办法]
我也是看别的帖子才看到的,具体文档也没找到
http://comments.gmane.org/gmane.comp.gnome.mono.devel/34639

热点排行