ohos-build

一、文档

https://stackoverflow.com/questions/49102921/how-to-include-a-shared-library-in-chromiums-gn-file
https://gitee.com/openharmony/build

二、流程

Gn配置构建目标(Gn运行后会生成ninja文件)->通过运行ninja来执行编译任务

三、名词

part_name  部件名称
subsystem  子系统名称
deps       部件内模块依赖
module_list gn模块

四、模板类型

ohos_executable
ohos_shared_library
ohos_static_library
ohos_source_set
ohos_prebuilt_executable
ohos_prebuilt_shared_library
ohos_prebuilt_etc

五、示例

sources = []
include_dirs = []
cflags = []
cflags_c = []
cflags_cc = []
ldflags = []
configs = []
module_install_dir
relative_install_dir
install_images = [] 

解读下列编译报错:[OHOS INFO] ERROR at //build/templates/cxx/cxx.gni:242:7: Script returned non-zero exit code. [OHOS INFO] exec_script(external_deps_script, arguments) [OHOS INFO] ^---------- [OHOS INFO] Current dir: /home/huangjianli/kh3.2/out/khdvk_rk3568_a/ [OHOS INFO] Command: /usr/bin/env /home/huangjianli/kh3.2/build/templates/common/external_deps_handler.py --external-deps eventhandler:libeventhandler ces_standard:cesfwk_innerkits hiviewdfx_hilog_native:libhilog --parts-src-flag-file build_configs/parts_src_flag.json --external-deps-temp-file gen/kaihong/communication/kh_iotsdk/src/bonding/kh_iotsdk__bondingtest_external_deps_temp.json --sdk-base-dir ../../sdk/ohos-arm --sdk-dir-name sdk/ohos-arm --current-toolchain //build/toolchain/ohos:ohos_clang_arm --innerkits-adapter-info-file ../../build/ohos/inner_kits_adapter.json [OHOS INFO] Returned 1 and printed out: [OHOS INFO] [OHOS INFO] file '../../sdk/ohos-arm/ces_standard/sdk_info.json' doesn't exist. [OHOS INFO] [OHOS INFO] stderr: [OHOS INFO] [OHOS INFO] Traceback (most recent call last): [OHOS INFO] File "/home/huangjianli/kh3.2/build/templates/common/external_deps_handler.py", line 248, in <module> [OHOS INFO] sys.exit(main()) [OHOS INFO] File "/home/huangjianli/kh3.2/build/templates/common/external_deps_handler.py", line 214, in main [OHOS INFO] sdk_module_info, adapted_ok = _get_external_module_from_sdk( [OHOS INFO] File "/home/huangjianli/kh3.2/build/templates/common/external_deps_handler.py", line 73, in _get_external_module_from_sdk [OHOS INFO] raise Exception("part '{}' doesn't exist in sdk modules.".format( [OHOS INFO] Exception: part 'ces_standard' doesn't exist in sdk modules. [OHOS INFO] [OHOS INFO] See //kaihong/communication/kh_iotsdk/src/bonding/BUILD.gn:16:1: whence it was called. [OHOS INFO] ohos_executable("bondingtest") { [OHOS INFO] ^------------------------------- [OHOS INFO] See //kaihong/communication/kh_iotsdk/BUILD.gn:123:7: which caused the file to be included. [OHOS INFO] "//kaihong/communication/kh_iotsdk/src/bonding:bondingtest", [OHOS INFO] ^----------------------------------------------------------
06-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值