android c++ 编译工具,C++编译器

C++编译器 介绍

C4droid is a user-friendly (but powerful) C/C++ IDE + C/C++ compiler for Android.

Basic features:

- Offline C compiler: create your own applications on Android device and run them even without Internet access

- Source code editor with syntax highlighting, tabs, code completion, code formatting, file association and undo/redo

- Export&share your programs as APKs or native executables (for terminal apps)

- No root required (but C4droid can use it for your programs if you want)

- Full ANSI C and ISO C99 support with TCC (Tiny C Compiler) + uClibc

- Git integration

- Customizable GUI, choose where to place tabs and buttons by yourself, themes are also supported.

More features with a free GCC plugin:

- Full C++ and almost complete C++11 support with GCC + Bionic libc

- NativeActivity, Qt, SDL and SDL2 support for GUI

- Debugger with breakpoints and watches

- Makefile support: use the same build scripts as on your PC (BusyBox is included)

- Semi-automatic open-source library porting feature for enhanced programming & education

C4droid is designed to be user-friendy out-of-the-box, but nothing is perfect, so here are some answers for questions that can appear:

How to install C++ support?

C4droid will ask you to install C++ support at first startup and will configure itself in semi-automatic mode.

If you want to do that manually, you need:

0) Enough internal memory OR root rights. C4droid does not require root rights for devices with more than 50MB of free internal memory.

1) Install GCC plugin (C4droid will ask you to install it).

2) Select G++ compiler in C4droid preferences.

3*) Add "using namespace std;" to your program(before int main), use iostream, not iostream.h

Note that if you want to use C4droid as a C compiler, it is better to select GCC, not G++.

How to use SDL, SDL2, NativeActivity and Qt in single-file mode?

Just install SDL plugin and select G++ compiler in C4droid preferences.

Note that C4droid chooses app mode using a very simple source code analysis:

SDL is detected with #include "SDL.h", SDL2 is detected with #include "SDL2/SDL.h", NativeActivity is detected with #include "android_native_app_glue.h", Qt is detected with #include "QApplication"

If you are compiling a single-file Qt app, you must add #include "yoursourcefilenamewithcpp.moc" to the end of source code file also.

How to use Makefiles, multifile projects, etc?

Long-click compile button (or select "compilation settings" if buttons are hidden/moved) and configure current directory to use the mode you want.

Note that C4droid will create .c4droid configuration file when you will press Ok. Some modes (like makefile) require to enter result executable file name, dont forget to do that.

After doing that all use compile and run buttons to build and run your app as regular.

How to build and install libraries?

Almost the same way as regular Makefile building except for that most probably some patching may be required.

Currently tested libraries are gmp(internal memory only),mpfr,mpc,libxml2,neon,sqlite,SDL_gfx(--disable-mmx required).

Which gestures/keyboard shortcuts does C4droid support?

Long-click gestures:

Save button: save as.

Open button: recent files.

Run button: run with arguments.

Compile button: configure current directory.

Tab: close tab.

Keyboard shortcuts:

Ctrl-C, Ctrl-V, Ctrl-X for Copy, Paste and Cut

Ctrl-S, Ctrl-O for Save/Open

Ctrl-Z, Ctrl-Y for Undo/Redo.

Ctrl-L for "go to Line"

Ctrl-F for Find

Ctrl-A for select All

Ctrl-B for Build/compile

Ctrl-R for Run

Ctrl-Space/Ctrl-D for autocompletion (Ctrl-Space may be reserved by Android)

Report bugs at n0n3m4@gmail.com.

C4droid stands for "c for android" (or "c++ for android").

C4droid is not an online compiler, so it uses real binaries.

Some binaries in APK are licensed under (L)GPL, email me for the source code (Tiny C compiler, GCC, BusyBox, etc.)

Android is a trademark of 网络 Inc.

Qt is a registered trademark of Digia.

C4droid是一个用户友好的(但功能强大)的C / C + + IDE + C / C + +编译器为Android。

基本特点:

- 离线C编译器:创建自己的Andr??oid设备上的应用程序,甚至没有互联网接入运行它们

- 源代码编辑器,语法高亮,标签,代码自动完成,代码格式化,文件关联,并撤消/重做

- 出口和分享你的节目的APK或本机的可执行文件(适用于终端应用程序)

- 无根所需要的(但C4droid可以使用它为你的程序,如果你想)

- 完整的ANSI C和ISO C99支持与台泥(微型C编译器)+ uClibc的

- 集成的Git

- 可定制的图形用户界面,选择其中自己放置标签和按??钮,也支持主题。

的功能与免费的GCC插件:

- 完整的C + +和几乎完整的c + + 11支持使用GCC +仿生的libc

- NativeActivity的,QT,SDL和SDL2的GUI支持

- 调试断点和手表

- Makefile文件的支持:使用相同的构建脚本为您的PC上(BusyBox的是包含)

- 增强的编程和教育半自动开源库的移植功能

C4droid被设计为用户friendy即开即装即用,但没有什么是完美的,所以这里有一些答案可能出现的问题:

如何安装c + +的支持?

C4droid会要求你安装c + +的支持,在第一次启动时将自身配置半自动模式。

如果您想手动做到这一点,你需要:

1)足够的内存或root用户权限。 C4droid不要求超过了可用的内部记忆体50MB设备root用户权限。

1)安装gcc插件(C4droid会问你要安装的话)。

2)选择G以+ +编译器在C4droid偏好。

3 *)添加“使用名字空间std;”你的程序(之前INT为主),使用的iostream,不IOSTREAM.H

需要注意的是,如果你想使用C4droid作为一个C编译器,这是更好的选择GCC,不是G + +。

如何使用SDL,SDL2,NativeActivity的和Qt在单个文件的模式?

只要安装SDL插件然后选择G + +编译器C4droid偏好。

需要注意的是C4droid使用一个非常简单的源代码分析选择应用模式:

SDL检测与#包括“SDL.h”,SDL2检测与#包括“SDL2 / SDL.h”,NativeActivity的检测与#包括“android_native_app_glue.h”,Qt是检测到的#include“的QApplication”

如果要编译一个文件的Qt应用程序,您必须添加#“yoursourcefilenamewithcpp.moc”源代码文件还月底。

如何使用Makefile文件,多文件项目等?

长按编辑按钮(或选择,如果按钮被隐藏/移动“编辑设置”),并配置当前目录下使用您想要的模式。

需要注意的是C4droid将创建.c4droid配置文件时,你会按OK键。一些模式(如生成文件)要求进入导致可执行文件的名称,不要忘了做。

这样做之后,所有使用的编译和运行按钮来建立并运行你的应用程序的常规。

如何构建和安装的库?

几乎以同样的方式作为常规的Makefile建筑物以外,大部分可能是一些修补可能需要。

目前测试库是GMP(内置存储器专用),MPFR,MPC,libxml2的,霓虹灯,sqlit

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值