如何解决Eclipse CDT的错误"功能“ISDIGIT”无法解析"与Android NDK? [英] How do I fix Eclipse CDT Error "Function 'isdigit' could not be resolved" with Android NDK?

查看:262
本文介绍了如何解决Eclipse CDT的错误"功能“ISDIGIT”无法解析"与Android NDK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的Eclipse靛蓝与一个Android / NDK混合项目。我已经添加了C ++的性质,几乎一切工作。自动生成工作;也就是说,当我编辑文件NDK建造调用并成功完成 - 不建立错误。将鼠标悬停在code辅助工程(小窗口弹出与有关功能的信息)。如果我把光标放在一个包括在线和preSS F3,相关的头文件打开(不是那个我希望根据我的配置,但有关的一个 - 或许线索)。

I am using Eclipse Indigo with an Android/NDK mixed project. I've added C++ nature and almost everything is working. Automatic builds work; that is, when I edit a file ndk-build is invoked and completes successfully - no build errors. Mouseover code assist works (the little window pops up with information about the function). If I place the cursor on an include line and press F3, a relevant header file open (not the one I would expect based on my configuration, but a relevant one - maybe a clue?).

如果我选择在我的.cpp文件以下行,它会打开$ NDKROOT /平台/ Android的-3 /弓臂/ usr / include目录/文件ctype.h:

If I select the following line in my .cpp file, it opens $NDKROOT/platform/android-3/arch-arm/usr/include/ctype.h:

#include <ctype.h>

(ISDIGIT在这个文件中定义)

(isdigit is defined in this file)

然而,Eclipse的坚持,ISDIGIT没有定义。我看了很多帖子表明,无论是静态分析仪或索引是难辞其咎的,但我已经尝试了许多建议的解决方案都无济于事。

However, Eclipse insists that isdigit is not defined. I have read many posts suggesting that either the static analyzer or the indexer is to blame, but I've tried many of the suggested solutions to no avail.

如果我添加类似下面的一行,错误消失和鼠标悬停code辅助的功能如下:

If I add a line like the following, the error goes away and mouseover code assist for the function works:

extern int isdigit(int);

再次,这是不是一个链接错误或编译器错误 - NDK建造没有任何错误完成。这里面的东西月食。感谢您抽空看看!

Again, this is not a linker error or a compiler error - ndk-build completes with no errors. This is something inside eclipse. Thanks for taking a look!

编辑:现在我相信这是一个code分析问题。更好的方法是编辑code分析选项,使功能无法解析是一个警告,而不是一个错误。这样,你可以看到存在的问题来看的警告,但继续工作。如果功能真的丢失了,编译器会告诉你!我也有一个新的理论,这个问题是与下面的符号链接的code分析仪,因为所有的失踪的功能是符号链接包含文件。很想对这个理论的任何输入。

I now believe this to be a Code Analysis problem. A better solution is to edit the Code Analysis options to make "Function could not be resolved" be a warning instead of an error. That way you can see the warnings in Problems view, but continue to work. If the function is REALLY missing, the compiler will tell you! I also have a new theory, that the problem is with the Code Analyzer following symlinks, because all of the "missing" functions are in symlinked include files. Would love any input on this theory.

推荐答案

我通过我提出我的问题,一直没能找到一个更好的办法呢。这种方法的工作解决此问题

I worked around this issue via the approach I suggested in my question and haven't been able to find a better way yet.

这篇关于如何解决Eclipse CDT的错误&QUOT;功能“ISDIGIT”无法解析&QUOT;与Android NDK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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