ERROR:'__NDK_FPABI__“没有指定类型 [英] ERROR: '__NDK_FPABI__' does not name a type

查看:862
本文介绍了ERROR:'__NDK_FPABI__“没有指定类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在编写本地code-基地,我得到了下面的错误 -

While compiling native code-base, I'm getting the following error -

<NDK-HOME>/platforms/android-17/arch-arm/usr/include/jni.h:235:68: error: expected ';' at end of member declaration
<NDK-HOME>/platforms/android-17/arch-arm/usr/include/jni.h:235:70: error: '\__NDK_FPABI__' does not name a type
...

随着吨的重复。

平台相关详情如下 -

Platform related details are as below -

Native OS: Windows 7 (64 bit) with Cygwin64
NDK Version: r9c

有一个类似的问题已报告这里 。然而,即使修改后的 LOCAL_CFLAGS ,我找不到中间文件的建议。

A similar problem has been reported here. However, even after modifying LOCAL_CFLAGS, I couldn't find the intermediate files as suggested.

在想,如果你们当中有些人已经若然遇到此问题,请你们有一个工作围绕这个?

Was wondering if some of you have faced this problem already and if so, do you guys have a work-around for this?

推荐答案

好吧,终于摆脱了这些__NDK_FPABI__错误的和我的祖国code编译就好了。事实上,有在中间文件微妙的暗示(*。我和*。②)由安德鲁在我的previous的链接后建议;这些通常涉及到找到合适的头。一旦相关进行了更改,事情工作就像一个魅力。

Alright, finally got rid of these __NDK_FPABI__ errors and my native code compiled just fine. Indeed, there were subtle hints in the intermediate files (*.i and *.ii) as suggested by Andrew in the link on my previous post; these are usually related to finding appropriate headers. Once relevant changes were made, things worked like a charm.

几件事我学会了在调试这个问题 -

Few things I learned while debugging this issue -


  • 的问题是头文件有关。某些头正在拾起 / usr / include目录否则应该已经从 $ NDK_HOME /平台/ $ ANDROID_VERSION / $ ARCH拿起/ usr / include目录即可。进行必要的更改在Android makefile文件固定我的问题。

  • 始终抗拒添加补丁程序,以NDK文件的诱惑。这将使从长远来看,你的生活轻松了许多。

  • 一个应该寻找中间文件(*。我,*。②,* S和其他少数)在 $ PROJECT_ROOT ,而不是 $ PROJECT_ROOT / JNI (假设本地code躺在那里)。

  • NDK的最新版本,即 NDK-r9d 修复了一些与__NDK_FPABI__相关错误的问题。

  • The problem was related to header files. Certain headers were being picked up from /usr/include which otherwise should have been picked up from $NDK_HOME/platform/$ANDROID_VERSION/$ARCH/usr/include. Making necessary changes in the Android makefile fixed the issue for me.
  • Always resist the temptation of adding hot-fixes to NDK files. This will make your life a lot easier in the long run.
  • One should look for the intermediate files (*.i, *.ii, *s and few others) in $PROJECT_ROOT, instead of $PROJECT_ROOT/jni (assuming native code lies there).
  • The latest release of NDK, namely ndk-r9d fixes some of the issues with __NDK_FPABI__ related errors.

希望这有助于!

这篇关于ERROR:'__NDK_FPABI__“没有指定类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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