BUILD.gn引用第三方so文件报错undefined symbol
报错内容
编译BUILD.gn
import("//build/ohos.gni")
config("task_thread_config") {
cflags_cc = [
"-frtti",
"-fexceptions"
]
}
ohos_executable("task_thread") {
sources = [
"src/task_test.cpp",
"src/task_executor.cpp",
"src/task.cpp",
]
configs = [":task_thread_config"]
include_dirs = [
"include",
]
deps = ["//applications/task/build:behavior_tree"]
part_name = "task_thread"
subsystem_name = "applications"
}
引用so的gn文件
import("//build/ohos.gni")
config("behavior_tree_config") {
include_dirs = [ "//third_party/BehaviorTree.CPP/include" ,]
}
ohos_prebuilt_shared_library("behavior_tree"){
source = "libbehaviortree_cpp.so"
install_enable = false
public_configs = [ ":behavior_tree_config" ]
subsystem_name = "applications"
part_name="task_thread"
}