设备是android 4.1的平板电脑,支持armeabi-v7a和mips,为了能用上poco c++ lib,用cmake编译了poco mips架构的lib,但在android studio里引用运行时就报

cannot locate symbol 'sigemptyset'

google了下,将

set(ANDROID_NATIVE_API_LEVEL android-21)改为
set(ANDROID_NATIVE_API_LEVEL android-16)
就ok了,如果是Application.mk文件,
APP_PLATFORM := android-16

-------------------------------------------------------

Android ndk cannot find symbol “sigemptyset”

I am building a C app for android, I use 'sigemptyset' in my app, when I compile the code using NDK it is compiled successfully, but when running the app I get cannot locate symbol 'sigemptyset'.

After searching I found that the problem is that I build the app using ndk-r11 which build for android-5 but I am running the app on android 4.4 where sigemptyset definition has changed. so I added the following to Android.mk:

TARGET_PLATFORM := android-19

but I still get the same error

Does anyone know how to fix this?

EDIT:

This question is not a duplicate of another question nor the answer there suggests changing the APP_PLATFORM parameter in Application.mk

The cause of problem is not the version of NDK that was used but version of target platform. android-19 is the last platform version where sigemptyset() (and many other functions) was declared as inline just at platform headers. As result - system libc on that devices doesn't contain such functions. So you are right - you should use proper target platform to allow your code to run on older devices. But you are doing it incorrectly. All that you need is add

APP_PLATFORM := android-19

to your Application.mk.

android cannot locate symbol 'sigemptyset'问题解决的更多相关文章

  1. cannot locate symbol "atof" referenced by错误分析

    ndk从r8升级到r10后, 使用eclipse编译出来的so库报错了,加载库的时候报错cannot locate symbol "atof" referenced by 原因:A ...

  2. [转]NDK编译库运行时报dlopen failed: cannot locate symbol "__exidx_end" 解决办法

    原文链接:http://blog.csdn.net/acm2008/article/details/41040015 当用NDK编译的库在运行加载时报如下错: dlopen("/data/d ...

  3. NDK编译库执行时报dlopen failed: cannot locate symbol "__exidx_end" 解决的方法

    当用NDK编译的库在执行载入时报例如以下错: dlopen("/data/data/xxx.xxx.xxx/lib/libxxx.so") failed: dlopen faile ...

  4. Android SDK Manager无法更新问题解决

    有时候在网络不好的情况下,android sdk manager更新可能一直报错.原因跟国内对于google相关服务的访问受限有关系,需要设置代理访问. 最近也遇到了这个问题.解决方法如下. 启动An ...

  5. Android studio 中国的垃圾问题解决

    为了获得良好的刚安装Android studio, 实例importproject时刻,你会发现很多中国的文件夹显示异常.例如下面的附图: 为什么会出现这个问题呢,事实上原因非常easy,由于Andr ...

  6. Android Studio项目构建常见问题解决

    1. 创建或导入项目后编译时一直在等待 问题: 原因:AS连网去下载gradle了,但是网络不好或不通 解决:禁用网络,AS就会立即自动终止下载进入到主界面了.此时再去指定离线的gradle版本进行编 ...

  7. failed: dlopen failed: cannot locate symbol

    修改proj.android/jni/Application.mk 添加:APP_PLATFORM := android-19

  8. Android SDK无法更新的问题解决办法

    问题: SSL hostname in certificate didn't matchhostname in certificate didn't match: <dl-ssl.google. ...

  9. Could not find com.android.support.constraint:constraint-layout的问题解决

    这几天使用android studio的各种坑之一: Error:Could not find com.android.support.constraint:constraint-layout:1.0 ...

随机推荐

  1. 每天一个linux命令: /etc/group文件详解

    Linux /etc/group文件与/etc/passwd和/etc/shadow文件都是有关于系统管理员对用户和用户组管理时相关的文件.linux /etc/group文件是有关于系统管理员对用户 ...

  2. MyEclipse连接CVS,如果中间经过一层代理,就没法直接联接到CVS了,哪位知道怎么办?

  3. Android 监听屏幕唤醒和关闭的广播

    今天希望应用程序的服务运行时,可以监听到屏幕的唤醒.继续百度学习法,连同监听闭幕关闭也一同学习了. 此种情况需要动态注册系统广播.在AndroidManifest.xml中静态注册的实际运行中无效. ...

  4. middle源码

    CREATE TABLE `middle` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `innserSessionid` VARCHAR(250 ...

  5. HOStringSense大段字符串检测器

    下载地址:https://github.com/holtwick/HOStringSense-for-Xcode 修改HOStringSense.xcodeproj工程里的HOStringHelper ...

  6. UNIX环境编程学习笔记(8)——文件I/O之校验当前登录用户对文件的访问权限

    lienhua342014-09-03 通过前面一篇随笔(文件访问权限与进程访问控制),我们知道内核校验文件的访问权限使用的是进程的有效用户 ID 和有效组 ID.但有时我们需要知道当前登录用户对某个 ...

  7. Vi编辑器修改文件.bash_profile可解决backspace出现乱码问题,rlwrap 的安装。

    Vi编辑器修改文件.bash_profile可解决backspace出现乱码问题 使用SecureCRT或是pietty_ch连接到一台安装有Oracle DB 10g的RHEL4.2的机器,linu ...

  8. IntelliJ IDEA删除代码的注释

    由于反编译出的Java每一行都有注释,因此查找批量替换 搜索框,正则表达式 (/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/|[ \t]*//.*) 或者 (/\* ...

  9. 二维码解析:使用 JavaScript 库reqrcode.js解析二维码

    上次使用QRCode.js可以来生成二维码,但是我没有找到有文档说明可以对存在的二维码进行扫描解析其中的内容. 幸亏查找到了可行的解决方案,而且很好使哦!就是reqrcode.js 地址:https: ...

  10. Python之XML解析详解

    什么是XML? XML 指可扩展标记语言(eXtensible Markup Language). XML 被设计用来传输和存储数据. XML是一套定义语义标记的规则,这些标记将文档分成许多部件并对这 ...