在NDK / Java项目Eclipse CDT的C / C ++ code完成的问题 [英] Eclipse CDT C/C++ code completion problem in NDK / Java project

查看:133
本文介绍了在NDK / Java项目Eclipse CDT的C / C ++ code完成的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android(Java)的项目,其中包括一些原生的C / C ++ code,我需要它能够为code完成对各种C类和放大器;功能。但是选择包括那里的(全)来源是似乎并没有成为在Android(Java)的项目中可用。

I have an Android (Java) project that includes some native C/C++ code and I need it to be able to code complete on various C classes & functions. However the option to include where the (full) source is from does not seem to be available in the Android (Java) project.

有谁知道的方式之一: 1)绝招Eclipse转换包括必要的项目属性面板项目(侧面板)? 2)通过使用某种形式的配置文件

Does anyone know of a way to either: 1) Trick Eclipse into including the necessary Project Properties panel item (side panel)? 2) Include the files manually through the use of some form of configuration file?

谢谢, 凯文

推荐答案

有两种基本的方法来设置一个NDK建设者在Eclipse:

There are two basic ways to setup a NDK builder in Eclipse:

  1. 在创建自定义生成器 - 在建立一个更容易一点,更便于携带,但并没有提供C ++自动完成,并且无法通过双击错误控制台浏览到源。 (这似乎是你的情况。)
  2. 基于CDT的建设者 - 导致较少便携的配置,但提供了所有的IDE功能JNI code

下面是一个好看的教程CDT的配置:
<一href="http://mhandroid.word$p$pss.com/2011/01/23/using-eclipse-for-android-cc-development/">http://mhandroid.word$p$pss.com/2011/01/23/using-eclipse-for-android-cc-development/

Here is a good-looking tutorial for the CDT configuration:
http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/

要启用对外部资源的code完成(和标准的Andr​​oid头),你需要打开项目属性>C / C ++通用>路径和符号,并添加您的包含路径列表

To enable the code completion for external sources (and for standard Android headers) you need to open "Project properties" > "C/C++ general" > "Paths and symbols" and add your include paths to the list:

NDKROOT - 包含我的NDK路径中的环境变量

NDKROOT - an environment variable containing path to my NDK

这篇关于在NDK / Java项目Eclipse CDT的C / C ++ code完成的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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