gpt4 book ai didi

c++ - dlopen 期间 undefined symbol

转载 作者:太空宇宙 更新时间:2023-11-04 04:55:23 27 4
gpt4 key购买 nike

尝试加载共享库:

handle = dlopen( "libaaa.so.2.5", RTLD_NOW );
if ( !handle )
{
printf("Failed to open aaa lib: %s\n", dlerror());
return 1;
}

当我运行 ./myBinary 时出现错误:

undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE

这个符号是什么意思?如何解决这个问题?

最佳答案

可执行文件可能需要-lstdc++。如果与 gcc 链接,请改为与 g++ 链接,它会为您链接到 C++ 标准库。

关于c++ - dlopen 期间 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47890484/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com