本人编译webrtc代码,遇到如下问题

In file included from E:/AndroidGips-Sample/jni/src/system_wrappers/source/map.c
c:11:
E:/AndroidGips-Sample/jni/src/system_wrappers/source/../interface/map_wrapper.h:
14:15: error: map: No such file or directory
In file included from E:/AndroidGips-Sample/jni/src/system_wrappers/source/map.c
c:11:
E:/AndroidGips-Sample/jni/src/system_wrappers/source/../interface/map_wrapper.h:
71: error: ISO C++ forbids declaration of 'map' with no type


查了半天发现是map找不到,后来才知道是不支持stl库



NDK R5之后增加了对C++ stl库的引用

所以在makefile中增加引用,同事在application.mk文件中增加相应应用即可


android.mk

增加:

LOCAL_SHARED_LIBRARIES := \
libcutils \
libdl \
libstlport


LOCAL_PRELINK_MODULE := false


ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif


application.mk中增加:

APP_STL := stlport_static


webrtc的源码里没有application.mk文件,所以需要增加该文件,这一点很费解,google也太能折腾人了

注:application.mk是和android.mk在同一目录,即都jni目录下


更多相关文章

  1. 如何用CVS下载SourceForge.net上的源码
  2. 最新版Android(安卓)Studio环境配置、安装步骤和问题解决
  3. WorkManager流程分析和源码解析
  4. Android(安卓)建立自己的手写笔画图案 Gesture Builder
  5. Android基础考试知识点清单
  6. Android(安卓)Handler深度解析源码(一)
  7. android-menu菜单的应用
  8. Android后端的项目创建流程(IDEA2020 + Tomcat 10 + JDK11)
  9. Android串口通信apk源码详解(附完整源码)

随机推荐

  1. android : 圆角按钮 shape属性
  2. Android(安卓)转场动画
  3. android 在SDCard获取图片
  4. android 操作sqllite 数据库
  5. Android将需要的日志文件LOG记录到本地文
  6. android跳转到卸载页面
  7. android 3D gallery 并 判断当前选中项
  8. Busybox for android
  9. android卸载应用工具类
  10. android API Demo之使用ViewFlipper制作