c++ for Android ----- ndk 编译链接 pthread 报错

来源:互联网 发布:最大公倍数算法 编辑:程序博客网 时间:2024/05/18 00:26

按正常的对c++的库文件引用,Android.mk文件应该这么写:

.......................LOCAL_LDLIBS += -lpthreadLOCAL_LDLIBS += -llog.......................

但是好端端的却报错误:

*****non-system libraries in linker flags: -lpthread *****************************error: cannot find -lpthread
使用find命令也能找到pthread,奇怪,,,在一遍文章的帮助下,让对lib的引用改掉,如下:

.......................LOCAL_LDLIBS += -pthreadLOCAL_LDLIBS += -llog.......................

真的连接过了,奇葩,奇葩。。。。。

跨界编程伤不起,满地都是坑。。。。




ref blog: http://www.eoeandroid.com/thread-312864-1-1.html

0 0