main.cpp:(.text+0x19): undefined reference to `dlopen'
main.cpp:(.text+0x22): undefined reference to `dlerror'
main.cpp:(.text+0x62): undefined reference to `dlsym'
需要在编译时加上-ldl。
将原来的编译命令:g++ cfgfile.cpp create.cpp main.cpp -o main
修改为:g++ cfgfile.cpp create.cpp main.cpp -o main -ldl
linux g++ undefined reference to `dlopen'类问题
最新推荐文章于 2022-09-16 15:55:44 发布