在Android中构建PJSiP时出错 [英] Error While building PJSiP in Android

查看:227
本文介绍了在Android中构建PJSiP时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在为Android构建pjsip时尝试输入此命令时,

When i tried to put this command while building pjsip for android,

TARGET_ABI = armeabi-v7a ./configure-android --use-ndk-cflags

TARGET_ABI=armeabi-v7a ./configure-android --use-ndk-cflags

发生此错误,

找不到编译器,请检查环境设置(TARGET_ABI等)

compiler not found, please check environment settings (TARGET_ABI, etc)

有人可以给我一个解释吗?pls

can somebody give me an explanation.pls

推荐答案

我确定您现在已经超越了这个范围,但是对于发现此线程的其他人来说:

I'm sure you've moved on past this by now, but for anyone else who finds this thread:

只需将NDK_TOOLCHAIN_VERSION环境变量设置为4.9

Just set the NDK_TOOLCHAIN_VERSION environment variable to 4.9

这可以通过在配置调用之前进行导出来完成:

This can be done either by doing an export prior to the configure call:

export NDK_TOOLCHAIN_VERSION=4.9
./configure-android

或与configure调用在同一命令行上:

or on the same command line as the configure call:

NDK_TOOLCHAIN_VERSION=4.9 TARGET_ABI=<whatever> ./configure-android --use-ndk-cflags

在android NDK的13+版本中,默认的编译器是Clang而不是GCC. PJSIP 2.6(撰写本文时为最新版本)尚未更新以正确解析Clang编译器位置,因此它声称未找到编译器,请检查环境设置".将NDK_TOOLCHAIN_VERSION设置为4.9会强制NDK使用GCC代替Clang,然后PJSIP将很高兴.

In revision 13+ of the android NDK, the default compiler is Clang instead of GCC. PJSIP 2.6 (newest as of this writing) is not yet updated to parse for the Clang compiler location correctly, so it claims "compiler not found, please check environment settings". Setting the NDK_TOOLCHAIN_VERSION to 4.9 forces the NDK to use GCC in place of Clang, and then PJSIP will be happy.

根据 NDK修订历史记录,以后将删除GCC释放.因此,如果有人阅读此文档使用的是已删除NDK的版本(在撰写本文时尚未发生),则只需降级NDK.

According to the NDK revision history, GCC will be removed in a future release. So if someone reading this is using a version of the NDK where it's been removed (which hasn't happened yet at the time of this writing), you'll need to just downgrade your NDK.

此解决方案来自此答案和相应的PJSIP凭单

This solution comes from this answer and the corresponding PJSIP ticket can be found here.

这篇关于在Android中构建PJSiP时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆