报错内容如下:

/usr/bin/env "../../build/toolchain/gcc_solink_wrapper.py" --readelf="../../prebuilts/clang/ohos/linux-x86_64/llvm/bin/llvm-readobj" --nm="../../prebuilts/clang/ohos/linux-x86_64/llvm/bin/llvm-nm"  --sofile="arkui/ace_engine/libace.z.so"  --output="arkui/ace_engine/libace.z.so" -- ../../prebuilts/clang/ohos/linux-x86_64/llvm/bin/clang++ -shared -L../../prebuilts/clang/ohos/linux-x86_64/llvm/lib/loongarch64-linux-ohos -L../../prebuilts/clang/ohos/linux-x86_64/llvm/lib/loongarch64-linux-ohos/c++ -Wl,--fatal-warnings -Wl,--build-id=md5 -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--as-needed -fuse-ld=lld -Wl,-z,max-page-size=16384 -Wl,--icf=all -Wl,--color-diagnostics -Wl,--no-undefined -Wl,--exclude-libs=libunwind_llvm.a -Wl,--exclude-libs=libc++_static.a -Wl,--exclude-libs=libvpx_assembly_arm.a --target=loongarch64-linux-ohos -Werror -Wl,--warn-shared-textrel -Wl,-O2 -Wl,--gc-sections -Wl,--gdb-index --sysroot=obj/third_party/musl -Wl,--allow-shlib-undefined -nostdlib -Lobj/third_party/musl/usr/lib/loongarch64-linux-ohos -L../../prebuilts/clang/ohos/linux-x86_64/llvm/lib/clang/18/lib/loongarch64-linux-ohos -L../../prebuilts/clang/ohos/linux-x86_64/llvm/lib/loongarch64-linux-ohos/c++ -Wl,--warn-shared-textrel -L../../prebuilts/clang/ohos/linux-x86_64/llvm/lib/loongarch64-linux-ohos -o "arkui/ace_engine/libace.z.so" @"arkui/ace_engine/libace.z.so.rsp" -Wl,-soname="libace.z.so"
ld.lld: error: undefined symbol: glViewport
>>> referenced by web_delegate.cpp:1712 (../../foundation/arkui/ace_engine/frameworks/core/components/web/resource/web_delegate.cpp:1712)
>>>               obj/foundation/arkui/ace_engine/frameworks/core/components/web/resource/ace_core_components_web_ohos/web_delegate.o:(OHOS::Ace::WebDelegate::GLContextInit(void*))

ld.lld: error: undefined symbol: glClearColor
>>> referenced by web_delegate.cpp:1713 (../../foundation/arkui/ace_engine/frameworks/core/components/web/resource/web_delegate.cpp:1713)
>>>               obj/foundation/arkui/ace_engine/frameworks/core/components/web/resource/ace_core_components_web_ohos/web_delegate.o:(OHOS::Ace::WebDelegate::GLContextInit(void*))

ld.lld: error: undefined symbol: glClear
>>> referenced by web_delegate.cpp:1714 (../../foundation/arkui/ace_engine/frameworks/core/components/web/resource/web_delegate.cpp:1714)
>>>               obj/foundation/arkui/ace_engine/frameworks/core/components/web/resource/ace_core_components_web_ohos/web_delegate.o:(OHOS::Ace::WebDelegate::GLContextInit(void*))

ld.lld: error: undefined symbol: glFlush
>>> referenced by web_delegate.cpp:1716 (../../foundation/arkui/ace_engine/frameworks/core/components/web/resource/web_delegate.cpp:1716)
>>>               obj/foundation/arkui/ace_engine/frameworks/core/components/web/resource/ace_core_components_web_ohos/web_delegate.o:(OHOS::Ace::WebDelegate::GLContextInit(void*))

ld.lld: error: undefined symbol: glFinish
>>> referenced by web_delegate.cpp:1717 (../../foundation/arkui/ace_engine/frameworks/core/components/web/resource/web_delegate.cpp:1717)
>>>               obj/foundation/arkui/ace_engine/frameworks/core/components/web/resource/ace_core_components_web_ohos/web_delegate.o:(OHOS::Ace::WebDelegate::GLContextInit(void*))
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
 

Logo

社区规范:仅讨论OpenHarmony相关问题。

更多推荐