➜  test_sqlite3 gcc *.c -I . -o xixi -pthread     
/tmp/cckGKTrr.o: In function `unixDlOpen':
sqlite3.c:(.text+0x1124d): undefined reference to `dlopen'
/tmp/cckGKTrr.o: In function `unixDlError':
sqlite3.c:(.text+0x1126c): undefined reference to `dlerror'
/tmp/cckGKTrr.o: In function `unixDlSym':
sqlite3.c:(.text+0x112bb): undefined reference to `dlsym'
/tmp/cckGKTrr.o: In function `unixDlClose':
sqlite3.c:(.text+0x112f1): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
 
 
在头文件中、加入
#include <dlfcn.h>
 
 
编译时,链接
dl库
 
 
如图
gcc编译出现dlopen、dlerror、dlsym、dlcolse的解决方法gcc编译出现dlopen、dlerror、dlsym、dlcolse的解决方法
 

相关文章:

  • 2022-01-10
  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
猜你喜欢
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2022-01-29
  • 2021-10-16
相关资源
相似解决方案