openharmony3.0头文件问题
我在code-3.0源码上编译oled例程时发现,build.gn中include头文件路径并不正确,但是能够编译成功,后来我干脆把include包含的头文件路径全删了,编译还是能够成功。
我又在code-1.0源码上尝试同样的操作,编译报错。
openharmony源码中头文件是怎样引用的,问啥在code-3.0中删除了build.gn中的头文件也能正常编译?
问题求助
赞
1
收藏 0
回答 1
待解决
相关问题
怎么可以获取openharmony3.0版本,谢谢!
8243浏览 • 2回复 待解决
DAYU200开发的 openharmony3.0 ArkTS应用开发中,怎么进行串口(UART)通信?
5631浏览 • 2回复 待解决
OpenHarmony 3.0 LTS camera驱动
3951浏览 • 0回复 待解决
HarmonyOS提供的头文件
207浏览 • 1回复 待解决
HarmonyOS har包无法封装头文件
224浏览 • 1回复 待解决
openharmony 3.0 小型系统 支持http模块的网络请求吗?
3436浏览 • 1回复 待解决
ndk中没有native camera对应头文件
1711浏览 • 1回复 待解决
HarmonyOS是否可以申明多个头文件
272浏览 • 1回复 待解决
在Windows平台使用VS code打开虚拟机Samba映射的harmony3.0代码,会显示无法打开头文件
6378浏览 • 1回复 待解决
HiSpark_AI_Camera开发套件OpenHarmony 3.0串口
7678浏览 • 1回复 待解决
Native侧如何引入头文件deviceinfo.h
1702浏览 • 1回复 待解决
OpenHarmony 9 napi找不到native_node_api,引入头文件报错'napi/native_node_api.h' file not found
2894浏览 • 1回复 待解决
基于HAR的跨模块C++头文件引用
630浏览 • 1回复 待解决
openharmony 3.0LTS 中liteos-a支持I2S输出吗
6156浏览 • 1回复 待解决
如何正确地在CMakeLists.txt文件中配置头文件搜索路径
1935浏览 • 1回复 待解决
HarmonyOS DevEco Studio 能否集成第三方的静态库,包含.a文件和.h头文件的?
2383浏览 • 1回复 待解决
openharmony是 如何找到 js文件 import 文件的源码在哪?
7888浏览 • 2回复 待解决
摄像头拍照录像问题 ,开发一个摄像头拍照获取图片的功能
1631浏览 • 1回复 待解决
openHarmony2.0 hb编译问题
10797浏览 • 5回复 待解决
OpenHarmony应用使用NativeC++无法读文件
2048浏览 • 0回复 待解决
openharmony如何使用arkts将文件写入指定路径
1987浏览 • 0回复 待解决
openHarmony 注册服务中的语法问题
6939浏览 • 1回复 待解决
openharmony 基于arkts的socket连接问题
3895浏览 • 1回复 待解决
OpenHarmony 使用WEB组件传值问题
3249浏览 • 1回复 待解决
使用DDT2.0下载源码,编译时找不到“ohos_init.h”头文件
10451浏览 • 3回复 待解决
搞清楚了,在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",
]