1. 程式人生 > >caffe 編譯/usr/local/lib/libopencv_highgui.so: undefined reference to `

caffe 編譯/usr/local/lib/libopencv_highgui.so: undefined reference to ` 阿新 發佈:2019-01-13

caffe編譯出現

/usr/local/lib/libopencv_highgui.so: undefined reference to `[email protected]_4.0'

或者

/lib/libcaffe.so.1.0.0-rc5: undefined symbol: ZN2cv8imencodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS

原因:

用ldd命令列出libcaffe.so.1.0.0-rc5依賴的動態庫,發現了問題,如下圖:

~/eclipseworkspace/caffe-master-alexnet-triplet (copy)/build/lib$ ldd libcaffe.so.1.0.0 |grep opencv
    libopencv_core.so.2.4 => /usr/local/MATLAB/R2016b/bin/glnxa64/libopencv_core.so.2.4 (0x00007f5e6e03f000)
    libopencv_highgui.so.2.4 => /usr/local/MATLAB/R2016b/bin/glnxa64/libopencv_highgui.so.2.4 (0x00007f5e6de1a000)
    libopencv_imgproc.so.2.4 => /usr/local/MATLAB/R2016b/bin/glnxa64/libopencv_imgproc.so.2.4 (0x00007f5e6d983000)

原來我使用的matlab中自帶了opencv動態庫,而且它在LD_LIBRARY_PATH的優先順序更高,所以libcaffe.so.1.0.0-rc5在執行時使用了matlab下的opencv庫,而不是我apt-get安裝的opencv庫。

將環境變數修改為opencv lib所在的路徑。

sudo geidt ~/.bashrc

相關推薦

caffe 編譯/usr/local/lib/libopencv_highgui.so: undefined reference to `<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="bde9f4fb

caffe編譯出現 /usr/local/lib/libopencv_highgui.so: undefined reference to `[email protected]_4.0' 或者 /lib/libcaffe.so.1.0.0-rc5: undefin

//home/sxl/miniconda2/lib/libpng16.so.16: undefined reference to `<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c9a0a7afa5a

編譯 caffe的命令中的 make all -j8 時出現: //home/sxl/miniconda2/lib/libpng16.so.16: undefined reference to `[email protected]_1.2.9' collect2: error: ld

win10 QtCreator5.10 編譯opengl出現 error: undefined reference to `<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="17487e7a6748487

1、在pro檔案中新增:  LIBS += -lopengl32 -lGLU32 -lglut 2、在程式中新增以下3個頭檔案: 3、下載glut32庫,(已上傳到本地),解壓出現以下5個檔案 為簡單起見,複製全部檔案到安裝路徑的三個地方:      

opencv error: undefined reference to `<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e7b3aea1a1b5828683a38e9582849388959ea7a

ubuntu16.04,在make opencv3.4.0 的時候,出現以下錯誤 解決方法: 參考:https://blog.csdn.net/wangchuansnnu/article/details/44241199  在 cmake 時,新增 cmake -D

Code::Blocks : undefined reference to `<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="bac2c2c2c2c2c2fa8e">[email protec

使用CodeBlocks在編譯程式的時候出現如下錯誤: undefined reference to `[email protected]'undefined reference to `[email protect

Code::Blocks : undefined reference to `<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="047c7c7c7c7c7c4430">[email protec

使用CodeBlocks在編譯程式的時候出現如下錯誤: undefined reference to `[email protected]'undefinedreferenceto`[email protected]'undefinedreference

Eclipse c++ 中[Linker error] undefined reference to `<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4314100210372231373633037

今天搭建了一個Eclipse+MinGW的C++開發環境,Eclipse的使用就是方便。 於是,就寫了一個socket程式,MinGW支援winsock2,但到編譯的時候總是報錯:undefined reference to `[email protected]'

初次使用Qt Creater網路程式設計,出現error: undefined reference to `<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="441b2d29341b1b131705173

在QT中編寫網路發報端/客戶端,時build時出現 error: undefined reference to `[email protected]’等,很多網路類似的錯誤 等大約10條e

編譯caffe 遇到error LNK2019: 無法解析的外部符號 <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="633c3c0a0e133c3c3302170b2e0217000b30130600

這是在gflags中的,由於google為了相容windows xp之前的系統 在config.h中有 // Define if you have the <shlwapi.h> h

mfcs100ud.lib(dllmodul.obj) : error LNK2005: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="da859eb6b697bbb3b49aebe8">[email

今天用VC2010寫一個用了MFC的規則DLL,編譯時報告如題錯誤。 必應後發現這篇文章  error LNK2005: [email protected] 已經在 MSVCRTD.lib(dllmain.obj) 中定義   http://wangl

undefined reference to symbol '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3242465a405753566d415b555f53415972">[email

/usr/bin/ld: CMakeFiles/xxxx/yyyyy.cpp.o: undefined reference to symbol '[email protected]@GLIBC

MSVCRTD.lib(crtexew.obj) : error LNK2019: 無法解析的外部符號 <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e1beb6888fac80888fa1d0d7"

一,問題描述 MSVCRTD.lib(crtexew.obj) : error LNK2019: 無法解析的外部符號 [email protected],該符號在函式 ___tmainCRTStartup 中被引用 Debug\jk.exe : fa

【轉】MSVCRTD.lib(crtexew.obj) : error LNK2019: 無法解析的外部符號 <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="adf2fac4c3e0ccc4c3ed9c

@2018-12-18 【小記】 vs-2013 編譯 cJSON code in git-hub 時遇見問題 error LNK2019,解決如下 【問題描述】MSVCRTD.lib(crtexew.obj) : error LNK2019: 無法解析的外部符號 [email pr

解決<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4d3f2222390d21222e2c2125223e39">[email protected]a>'s password:local

第一種原因:是當前的登陸密碼識別無效 背景:在裝完的Hadoop及JDK之後,在執行start-all.sh的時候出現            root @ localhost的密碼:localhos

nafxcwd.lib(dllmodul.obj) : error LNK2005: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7f203b1313321e16113f4e4d">[email&#

朋友編寫一個dll,編譯時總出現"nafxcwd.lib(dllmodul.obj) : error LNK2005: [email protected]..."錯誤!後發現是,其建立dll時選擇的時不使用MFC,而後來工程中又添加了與MFC相關的東西.才引起上述問題.採用如

Android Studio 3.0.1 gradle編譯報錯 Error : unable to resolve dependency for <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="a0c1

在app目錄下build.gradle中引用了第三方類庫,gradle編譯時不斷報錯,無法resolve第三方類庫,或者無法download第三方類庫dependencies { implementation fileTree(include: ['*.jar'],

DLL檔案編譯出錯<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c49b80a8a889a5adaa84f5f6">[email protected]a> already defined

編譯MFC DLL程式時出現 Error2error LNK1169: one or more multiply defined symbols foundE:\C++\HookTest\CopyFi

[轉]在vs2008上編譯獲取cpu程式碼出現的錯誤- error LNK2019: 無法解析的外部符號 <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="91ced6f4e5c1e3fef2f4e2e2

1>正在連結...1>LINK : 沒有找到 E:\yy\20110112\cpuproject\cpu\Debug\cpu.exe 或上一個增量連結沒有生成它;正在執行完全連結1>cpu.obj : error LNK2019: 無法解析的外部符號 ,該符號在函式 "void __cde

[轉]MSVCRTD.lib(crtexew.obj) : error LNK2019: 無法解析的外部符號 <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8ed1d9e7e0c3efe7e0cebf

二,原因及解決辦法 產生這個問題的真正原因是c語言執行時找不到適當的程式入口函式,一般情況下,如果是windows程式,那麼WinMain是入口函式,表示工程中可以建立圖形視窗。 如果是dos控制檯程式,那麼main是入口函式,在VS2010中新建專案為“w

undefined reference to symbol <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e29a9aa2">[email protected]a>@GLIBC_2.2

記一次編譯過程 undefined reference to symbol  [email protected]@GLIBC_2.2.5  1. 開始以為是連結錯誤,更換庫的順序,但不奏效 2. 把動態庫換成靜態庫,這個肯定一樣的效果 3. 更新gcc版本 4.