zoukankan      html  css  js  c++  java
  • undefined reference to `dlopen'

    g++ -O0 -g3 -I. -Ithird/json -Ithird/core/include -Ithird/vite/include -Ithird/openfst-1.2.10/src/include -o a.out test/test.c test/build/testbuild.o test/train/test_lm2.o test/tool/load_two/load_two.o test/tool/multi_thread/test-multi.o test/tool/mem_check/mem_check.o test/tool/test_ncc/test_nc.o lib/lm.a -lpthread -ldl -lrt -lm -L/usr/local/lib third/vite/lib/vite_g.a third/core/lib/core_g.a -liconv
    third/core/lib/core_g.a(sqlite3.o): In function `unixDlOpen':
    /home/jfyuan/svn/aispeech/speechplatform/branches/wtk-jfy/third/sqlite/sqlite3.c:29024: undefined reference to `dlopen'
    third/core/lib/core_g.a(sqlite3.o): In function `unixDlError':
    /home/jfyuan/svn/aispeech/speechplatform/branches/wtk-jfy/third/sqlite/sqlite3.c:29038: undefined reference to `dlerror'
    third/core/lib/core_g.a(sqlite3.o): In function `unixDlSym':
    /home/jfyuan/svn/aispeech/speechplatform/branches/wtk-jfy/third/sqlite/sqlite3.c:29064: undefined reference to `dlsym'
    third/core/lib/core_g.a(sqlite3.o): In function `unixDlClose':
    /home/jfyuan/svn/aispeech/speechplatform/branches/wtk-jfy/third/sqlite/sqlite3.c:29069: undefined reference to `dlclose'
    collect2: error: ld returned 1 exit status

    原因:-ldl 在core_g.a之前导致的

    解决办法:调换一下顺序即可。

  • 相关阅读:
    Python Challenge 第五关
    Python Challenge 第四关
    Python Challenge 第三关
    Python Challenge 第二关
    Python Challenge 第一关
    使用Python计算研究生学分绩(绩点)
    CUDA程序计时
    Python远程视频监控程序
    grunt项目构建
    jQuery中.bind() .live() .delegate() .on()的区别
  • 原文地址:https://www.cnblogs.com/tibetanmastiff/p/5761716.html
Copyright © 2011-2022 走看看