博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
android cannot locate symbol 'sigemptyset'问题解决
阅读量:6703 次
发布时间:2019-06-25

本文共 1520 字,大约阅读时间需要 5 分钟。

设备是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 -------------------------------------------------------

 


0
 

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.

转载地址:http://zogoo.baihongyu.com/

你可能感兴趣的文章
简历撰写
查看>>
观察者模式-Observer Pattern
查看>>
非root用户sudo_ssh免密钥
查看>>
java Thread编程(二)sleep的使用
查看>>
数据结构7.3_图的遍历
查看>>
求给定数目的前 n 个素数
查看>>
MATLAB矩阵操作和算术运算符
查看>>
[渗透测试]扫目录,Sqlmap利用均超时,利用dirb扫描
查看>>
滚动行为
查看>>
tensorflow源码安装
查看>>
jquery 操作日期、星期、元素的追加
查看>>
输入一个数,判断他是不是质数
查看>>
初始化CSS
查看>>
html概述和基本结构
查看>>
地址运算符:&
查看>>
Eclipse4JavaEE安装SpringBoot
查看>>
艾伟也谈项目管理,我是如何带领团队开发项目的
查看>>
(五)springcloud微服务分布式云架构 - 云架构代码结构构建
查看>>
C++ string::size_type
查看>>
springboot 整合 mongodb实现 批量更新数据
查看>>