DragonOS/docs/userland/appdev/c-cpp-quick-start.md
LoGin e8b1db320d
chore: Bump dadk to 0.2.0 (#1058)
# 概述

把dadk版本升级到0.2.0

dadk 0.2.0能够提升编译速度,并且支持使用dadk对内核进行profiling。
新版dadk的文档: https://docs.dragonos.org.cn/p/dadk/

# 注意

这是一个breaking change,升级后,将无法使用dadk 0.2.0去编译旧的项目。如有需要,请手动降级到dadk 0.1.11:
```shell
cargo install --git  https://git.mirrors.dragonos.org.cn/DragonOS-Community/DADK --tag v0.1.11
```

# 更改列表

* chore: 把管理用户程序编译的dadk配置文件改为新格式的

* feat: 使用新版dadk来创建\挂载\卸载磁盘镜像

* chore: bump dadk min version to 0.2.0

* chore: fix ci

* chore: 更新github ci镜像到1.7

* doc: 添加文档

---------
Co-Authored-by: xuzihao <xuzihao@dragonos.org>
Signed-off-by: longjin <longjin@DragonOS.org>
2024-11-27 01:30:31 +08:00

18 lines
602 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 为DragonOS开发C/C++应用
## 编译环境
&emsp;&emsp;DragonOS与Linux具有部分二进制兼容性因此可以使用Linux的musl-gcc进行编译。但是由于DragonOS还不支持动态链接
因此要增加编译参数`-static`
比如,您可以使用
```shell
musl-gcc -static -o hello hello.c
```
来编译一个hello.c文件。
在移植现有程序时,可能需要配置`CFLAGS``LDFLAGS`,以及`CPPFLAGS`,以便正确地编译,具体请以实际为准。
## 配置dadk
请参考:[Quick Start | DADK](https://docs.dragonos.org.cn/p/dadk/user-manual/quickstart.html)