使用WEBRTC编译NDK项目
Compiling ndk project with WebRTC
我正在尝试将WebRTC
的C API集成到我的项目中。我能够构建libwebrtc
并在Windows上链接它。
该项目是针对跨平台的,因此应与NDK一起编译。但是当我包括WebRTC
标头时,它会如下所示:
webrtc/p2p/base/icetransportinternal.h(141,42) : error: no member named 'to_string' in namespace 'std'
webrtc/p2p/base/icetransportinternal.h(141,42) : error: no member named 'to_string' in namespace 'std'
webrtc/p2p/base/transportchannel.h(66,42) : error: no member named 'to_string' in namespace 'std'
webrtc/p2p/base/transportchannel.h(66,42) : error: no member named 'to_string' in namespace 'std'
我知道std::to_string
在NDK环境中无法使用(请参阅Android NDK STD :: TO_STRING支持)。但是Wierd的事情是我已经成功地为Android构建了libwebrtc
。
我如何解决这种情况?
我知道std :: to_string在NDK环境中无法使用(请参阅Android NDK STD :: TO_STRING支持)。
取决于您选择的STL;它可与libc 一起使用,但不能使用gnustl(https://github.com/android-ndk/ndk/issues/82)。可以推定使用libc 构建的WebRTC,您正在使用Gnustl。
https://github.com/thepacific/webrtc-android-jni/tree/tree/master/so"下载所有这些文件并放入您的libs文件夹,然后直接使用system.load.load(" lib名称");
相关文章:
- 获取位于安卓工作室中可绘制的图像的绝对路径,用于NDK项目
- "ndk-build finish with non-zero exit value 2" 在编译文本仙女项目时
- 为什么当我的项目是使用 Android NDK r16 构建时,我会收到来自 Android NDK r11 的错误消息
- 在 NDK 上编译两个带有 gradle 的项目,其中一个依赖于另一个的二进制文件
- NDK - 包含一个预构建的库,并在 Android 项目中调用本机函数
- 如何将OpenCV 4.0集成到纯C Android NDK项目中
- 使用WEBRTC编译NDK项目
- 在Android NDK项目中使用webrtc-58 - 使用QT构建时"Undefined reference to CopyOnWriteBuffer"
- 如何将文件添加到Android项目中,然后使用NDK加载它
- 将 SQLite 添加到 Android NDK 项目
- 构建大型项目时,NDK构建会卡住/悬挂
- Android NDK传达不同的C ++项目
- 如何将我的 NDK 项目拆分为库和应用程序
- 如何使用 Android Studio+NDK 在C++中开发项目
- 链接到使用ndk构建的Android库项目中的共享库
- 如何在android ndk项目中使用C++类
- Eclipse-CDT无法在NDK项目中找到标准库符号
- 我正在尝试在Windows上的android工作室中运行一个基本的Android-NDK项目,但不断收到未知文件错误
- 用android ndk项目构建其他库
- Android NDK项目中未定义的引用错误