c++程序编译出现问题:
dso_dlfcn.c:(.text+0x18): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x28): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x34): undefined reference to `dlclose'
../lib/liblive555.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x1b8): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x270): undefined reference to `dlerror'
../lib/liblive555.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x2d0): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x344): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x37c): undefined reference to `dlerror'
../lib/liblive555.a(dso_dlfcn.o): In function `dlfcn_pathbyaddr':
dso_dlfcn.c:(.text+0x414): undefined reference to `dladdr'
dso_dlfcn.c:(.text+0x480): undefined reference to `dlerror'
../lib/liblive555.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x678): undefined reference to `dlclose'
解决方法:
编译时添加参数 -ldl