需要一个简单的Linux C ++ IDE(Android的NDK) [英] Need a simple Linux C++ IDE (Android NDK)
问题描述
我需要一个IDE必须:
I need an IDE that must:
- 允许运行的〜/ Android的NDK-R7 / NDK的构建脚本
汇编; - 拦截了gcc输出并显示给我;
- 当我点击了错误路线,跳转到错误位置:打开上述文件在提到行 。
我有一个大现有的C ++项目,并正在将它移植到Android / NDK。
I have a large existing C++ project and am porting it to Android/NDK.
(无论是code :: Blocks的也不做的Eclipse第三。也许我失去了一些东西?)
(Neither Code::Blocks nor Eclipse do the 3rd. Maybe I am missing something?)
推荐答案
我配置code :: Blocks的为Android NDK / JNI的发展,但有一个窍门。
$ C $个cblocks认为它可以知道你用的什么编译器,并希望从使用的东西,它不知道阻止你。你欺骗了。
I configured Code::Blocks for Android NDK/JNI development, but there's a trick. Codeblocks believes that it can know what compiler you use, and wants to stop you from using something it does not know. You have to trick it.
- 创建一个空$ C $个cblocks项目
- 添加源文件和头文件(手动)
- 单击在工作区项目(左窗格)鼠标右键。你会看到一个菜单:
(编辑:首先去的属性的并指定这是一个定制的Makefile文件,然后的构建选项的) - 进入属性,并告诉CB它有一个定制的Makefile文件。不要告诉它任何接近有关平台的真相:它会告诉你,你没有必要的编译器和甚至不会试图建立的东西。
- 最后,在构建选项的,选择GNU GCC编译,进入make命令,写你的自定义命令。 (我个人创建了一个调用NDK构建一个Makefile文件 - 我preFER保持脚本中的文本文件,而不是在GUI对话框,你可能要更改该项目是
-j 4
)
- Create an empty codeblocks project
- Add your source and header files (manually)
- Click the right mouse button on your project in the workspace (the left pane). You will see a menu:
( First go to Properties and specify it's a custom Makefile, then to Build options) - Go to "Properties" and tell CB it has a custom Makefile. Do not tell it anything close to the truth about the platform: it will tell you that you don't have the required compiler and will not even attempt to build something.
- Finally, in the Build options, select the GNU GCC Compiler, go to the "Make commands", and write your custom commands. (Personally I created a Makefile that invokes ndk-build -- I prefer to keep scripts in the text files rather than in GUI dialogs. The item that you might want to change is
-j 4
)
和最后一个注意:如果您的配置不工作,你没有意义的诊断
And one final note: if your configuration does not work, you get no meaningful diagnostics.
PS这里是我的Makefile:
PS Here's my Makefile:
all:
@echo '====all===='
pwd;~/android-ndk-r7/ndk-build -j 4
clean:
@echo '====clean===='
pwd;~/android-ndk-r7/ndk-build clean
.PHONY: clean
.PHONY: all
这篇关于需要一个简单的Linux C ++ IDE(Android的NDK)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!