包括< jni.h>并与臂Linux的gnueabi-GCC编译 [英] include <jni.h> and compile with arm-linux-gnueabi-gcc

查看:269
本文介绍了包括< jni.h>并与臂Linux的gnueabi-GCC编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关在给定的原因,
的Andr​​oid GCC SYSROOT和连接器获得Ubuntu上编译NDK的项目,我编我的Andr​​oid NDK与项目臂Linux的gnueabi-GCC 。没有与Android的NDK特异性不包括编译时,但现在包括没有问题 jni.h

For reasons given at Android gcc sysroot and linker for compiling NDK projects on Ubuntu, I am compiling my Android NDK project with arm-linux-gnueabi-gcc. There are no problems when compiling with no Android-NDK-specific includes, but now to include jni.h,

ARM-Linux的gnueabi-gcc的-static -o MAIN.EXE main.c中-I'path /到/ native_app_glue'-I'/路径/要/ Android的14 /弓臂/ usr / include目录

我得到一些神秘的错误未定义的引用__sF

I get some cryptic error undefined reference to __sF.

有谁知道什么可能是错误的或者有没有人得到的Andr​​oid NDK项目 jni.h 来像这样一个独立的工具链编译成功?

Does anyone know what could be wrong or has anyone gotten Android NDK projects with jni.h to successfully compile with a standalone toolchain like this?

推荐答案

除非你静态链接的一切,用编译臂Linux的gnueabi - 工具链并不会因为Android的工作使用不同的sonames比Ubuntu的。

Unless you link everything statically, compiling with arm-linux-gnueabi- toolchain will not work because Android uses different sonames than Ubuntu.

这篇关于包括< jni.h>并与臂Linux的gnueabi-GCC编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆