qt opencv編譯錯誤 /usr/local/lib/libopencv_imgcodecs.so.3.1:-1: error: error adding symbols: DSO mis...

轉載自:http://tbfungeek.github.io/2016/03/05/Opencv-%E5%AE%89%E8%A3%85%E8%BF%87%E7%A8%8B%E4%B8%AD%E5%87%BA%E7%8E%B0%E7%9A%84%E9%94%99%E8%AF%AF/git

 

3.Qt 編寫的代碼運行時出現相似錯誤:github

/usr/local/lib/libopencv_imgcodecs.so.3.1:-1: error: error adding symbols: DSO missing from command lineui

這種通常是連接庫沒有添加:
往項目的pro文件中的動態庫連接部分添加報錯的庫:
以下所示:spa

INCLUDEPATH += /usr/local/include \
/usr/local/include/opencv \
/usr/local/include/opencv2

LIBS += /usr/local/lib/libopencv_highgui.so \
/usr/local/lib/libopencv_core.so \
/usr/local/lib/libopencv_imgproc.so \
/usr/local/lib/libopencv_imgcodecs.so <------ 這個庫沒有添加致使的,往這裏添加
相關文章
相關標籤/搜索