Unknown reference to __dlopen in dlopen

后端 未结 2 1139
庸人自扰
庸人自扰 2021-02-08 18:46

dlopen is located in libdl.a but when I link my application against libdl.a , gcc linker throw this error : unknow reference to __dl

2条回答
  •  北海茫月
    2021-02-08 19:45

    You should be able to use the shared library libdl.so with

    gcc -ldl ...
    

    if you don't have a strong requirement on using the static version.

提交回复
热议问题