来自Eclipse的错误错误:函数'__android_log_print'无法解析(Android,CDT) [英] false error from Eclipse: Function '__android_log_print' could not be resolved (Android, CDT)

查看:395
本文介绍了来自Eclipse的错误错误:函数'__android_log_print'无法解析(Android,CDT)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android NDK项目,其NDK部分从命令行编译好;
我以前在Eclipse中将编译的东西作为纯Java项目运行没有问题。但是我把它转换成了一个C / C ++项目,现在甚至不能运行它。



我在控制台中看到库是构建的,
:Eclipse告诉我,我的项目有错误,它不会运行它。
(为什么在地球上?代码编译!!!)



我已经解决了一些缺少符号的问题,路径到项目属性。



但我仍然得到这个奇怪的
函数'__android_log_print'无法解析
错误。



所以,两个问题:


  1. 如何摆脱这个错误?(可以忽略吗?)

  2. 计划B:如何转换这个混合的C / C ++ / Java项目到纯Java的一个?

= = =



PS当你叫船,所以它会做。他们不能只是为IDE找到一个更好的名字,像Lucid编码? (修辞问题)



= = =



更新:Eclipse似乎只报告错误它看到(就是显示你)。我已经打开了一个LOGD宏的另一个文件,并且Eclipse也报告了一个错误。我已关闭所有文件窗口,关闭Eclipse 删除了一个.something文件。之后,我能够运行应用程序。我没有使用该日志记录宏打开源文件的风险。 (这是非常远的Lucid编码,不是吗?)

解决方案

CDT索引器的配置需要启用索引未使用的标题...



如何到达:Project->属性 - > C / C ++通用 - >索引器。





取消我的错误。


I have an Android NDK project whose NDK part compiles ok from command line; I used to have no problems with running the compiled stuff from under Eclipse as a pure Java project. But I converted it to a C/C++ project and now cannot even run it.

I see in the "Console" that the library is built, BUT: Eclipse tells me that my project has errors and it will not run it. (Why on Earth? The code is compiled!!!)

I have resolved some issues with missing symbols by adding include paths to the project properties.

But I'm still getting this weird Function '__android_log_print' could not be resolved error.

So, two questions:

  1. How do I get rid of this error? (Can it be ignored?)
  2. Plan B: how do I convert this mixed C/C++/Java project to a pure Java one?

= = =

PS "As you call the ship, so it will do". Could not they just find a better name for an IDE, something like "Lucid coding"? (Rhetoric question)

= = =

UPDATE: It looks like Eclipse reports errors only for the files that it sees (that is, shows you). I have opened another file with a LOGD macro, and the Eclipse reported an error for it too. I have closed all file windows, closed Eclipse and deleted a .something file. After that, I was able to run the application. I did not risk to open the source files with that logging macro. (That's very far from "Lucid coding", isn't it?)

解决方案

The configuration of CDT indexer needs to enable "Index unused headers ..."

How to get there: Project->Properties->C/C++ General->Indexer.

Gets rid of the error for me.

这篇关于来自Eclipse的错误错误:函数'__android_log_print'无法解析(Android,CDT)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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