[OHOS ERROR] [GN] ERROR at //vendor/hihope/dayu300/bluetooth/BUILD.gn:73:5: OHOS component : (//base/hiviewdfx/hilog/interfaces/native/innerkits) not found.
[OHOS ERROR] [GN] "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog"
[OHOS ERROR] [GN] ^------------------------------------------------------------
[OHOS ERROR] [GN] See //build/templates/cxx/cxx.gni:972:3: whence it was called.
[OHOS ERROR] [GN] shared_library("${target_name}") {
build.gn 如下写的依赖:
external_deps = [
"//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog"
]
这个目标是存在的啊,为啥编译报告上面找不到 呢
ing@113ser:~/work/oh6/dayu300_0210$ ls base/hiviewdfx/hilog/interfaces/native/innerkits/ -l
total 24
-rw-rw-r-- 1 ing ping 5402 2月 10 20:40 BUILD.gn
drwxrwxr-x 4 ing ing 4096 2月 10 20:40 include
-rw-rw-r-- 1 ing ing 8497 2月 10 20:40 libhilog.map
其中BUIlD.gn 有如下:
template("libhilog") {
forward_variables_from(invoker, "*")
if (current_os == "android" || current_os == "ios") {
ohos_static_library(target_name) {
public_configs = [ ":libhilog_pub_config" ]
deps = [ "../../../platform:libhilog_platform_source_$platform" ]
part_name = "hilog"
subsystem_name = "hiviewdfx"
}
} else {
ohos_shared_library(target_name) {
branch_protector_ret = "pac_ret"
sanitize = {
cfi = true
cfi_cross_dso = true
debug = false
}
public_configs = [ ":libhilog_pub_config" ]
deps = [ "../../../frameworks/libhilog:libhilog_source_$platform" ]
if (platform == "ohos") {
output_extension = "so"
version_script = "libhilog.map"
}
install_enable = !hilog_native_feature_ohcore
install_images = [
"system",
"updater",
]
if (platform == "ohos") {
innerapi_tags = [
"chipsetsdk",
"platformsdk",
"sasdk",
]
}
part_name = "hilog"
subsystem_name = "hiviewdfx"
}
}
}
build.gn改成external_deps=["hilog:libhilog"]
bundle.json里components里添加"hilog"
