1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我在code-3.0源码上编译oled例程时发现,build.gn中include头文件路径并不正确,但是能够编译成功,后来我干脆把include包含的头文件路径全删了,编译还是能够成功。
我又在code-1.0源码上尝试同样的操作,编译报错。 openharmony源码中头文件是怎样引用的,问啥在code-3.0中删除了build.gn中的头文件也能正常编译? |
|
相关推荐
1个回答
|
|
搞清楚了,在code-3.0中由config.gni为开发板编译相关的配置,编译时会采用该配置文件中的参数编译所有OS组件,编译阶段系统全局可见。在config.gni中包含了很多头文件,常用的基本包含在内了,如下所示:
# Board related headfiles search path. board_include_dirs = [ "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/system/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/config", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/config/nv", "${ohos_root_path}utils/native/lite/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/hi3861_adapter/kal/cmsis", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/kernel/base/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/targets/hi3861v100/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/kernel/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/arch/risc-v/rv32im", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libm/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libsec/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/net/wpa_supplicant-2.7/src/common", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/targets/hi3861v100/plat/riscv", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/kernel/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/kernel/extended/runstop", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/posix/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/linux/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/third_party/lwip_sack/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/musl/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/musl/arch/generic", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/musl/arch/riscv32", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/hw/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/nuttx/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libsec/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/targets/hi3861v100/config", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/targets/hi3861v100/user", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/targets/hi3861v100/plat", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/targets/hi3861v100/extend/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/arch", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/components/lib/libc/bionic/libm", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/shell/include", "${ohos_root_path}device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/net/telnet/include", ] |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
掰掉卫星电话的外置天线,华为“天才少年”助力 Mate 捅破天
5279 浏览 0 评论
1203 浏览 2 评论
华秋电子 | 德赢Vwin官网 亮相OpenHarmony人才生态大会2024
2298 浏览 0 评论
OpenHarmony有 支持的分布式数据库吗? 自动同步各节点数据?
1637 浏览 0 评论
OpenHarmony人才生态大会南向生态社区发展论坛在武汉圆满举办
1241 浏览 0 评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 01:21 , Processed in 0.597188 second(s), Total 73, Slave 55 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号