包括错误与pjsip作为静态库在Android NDK项目
Include errors with pjsip as static library in Android NDK project
基于这两个库的例子,我构建了一个pjsip作为静态库。到目前为止一切顺利。但是当我仅仅从库中包含一个文件到库外的文件时,我得到了许多错误。
编辑:这是一个Eclipse项目,使用Android.mk我试着添加到Android.mk:FILE_LIST_H := $(filter %.h*, $(ALLFILES))
LOCAL_C_INCLUDES := $(FILE_LIST_H:$(LOCAL_PATH)/%=%)
Demo.cpp:
#include <jni.h>
#include <pjsip/include/pjsua-lib/pjsua.h>
输出Compile++ thumb: Demo <= Demo.cpp
从C:/workspace/Demo/jni/Demo.cpp:3:
pjsup .h:30:19: error: pjsup .h: No such file or directory
pjsua.h:33:21: error: pjmedia.h: No such file or directory
pjsua.h:36:27: error: pjmedia-codec.h: No such file or directory
它是这样的…
请建议,10XS,
Nir
使用-I<location of the pjsip include folder>
将pjsip include目录添加到编译器调用中。由于您没有提到您是使用IDE还是仅仅使用makefile,因此很难给出更具体的建议。如果您使用的是Android .mk
文件,请添加LOCAL_C_INCLUDES:=<path to your pjsip include folder>
。
相关文章:
- Android NDK传感器向事件队列报告奇怪的间隔
- Android NDK 编译 LAME HAVE_MPGLIB > 'interface.h' 文件未找到
- Android NDK clang 编译器错误在 Windows 上显示'No such file or directory'
- 在 constexpr 构造函数 (c++17) 中赋值到 const char * 在使用 Android NDK 时
- 如何在 android ndk 上链接 C 和 C++ 代码,以及 C 和 C++ 运行时库(包括 STL)?
- Android NDK 未定义对ASensorEventQueue_registerSensor的引用
- 如何将 libjpeg-turbo Android NDK 添加为静态库
- 在 Flutter 应用程序中使用 Android NDK 中的 AssetManager 类
- Android NDK - 无法在 Visual Studio 2017 中调试
- 不再支持Android NDK APP_STL gnustl_shared
- Android NDK:用于第三方Java库的静态或共享C++运行时
- 为 Android NDK 编译库
- 从文件问题加载纹理 Android NDK 和 OpenGL
- Android NDK - C++ 异常会导致第三方原生库崩溃
- 如何在 Android/NDK 上将命令行参数从 gradlew.bat 传递到 Clang
- [android ndk]如何获取资产文件夹中文件的绝对路径?
- Android NDK.Build命令失败.未定义的引用.clang++:错误:链接器命令失败,退出代码为1
- 如何在Android(NDK)中使用CPR库
- 使用 Android NDK 使用 clang++ 编译C++代码时对"_Unwind_Resume"的未定义引用
- 如何在 C/Android NDK 中将字符串日期转换为毫秒