libdl专题

centos7 libdl.so

一、 使用libdl.so库 动态库加载原理 动态库中函数的查找已经封装成哭libdl.so libdl.so里面有4个函数: dlopen//打开一个动态库 dlsym//在打开的动态库里找一个函数 dlclose//关闭动态库 dlerror//返回错误 dl.c [cpp]  view plain copy

Undefined reference to symbol ‘dlclose@@GLIBC_2.2.5‘ //lib/x86_64-linux-gnu/libdl.so.2

我用cmake编译经常遇到一个问题,今天在这里记录一下: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command linecollect2: error: ld returned