2017-07-31 122 views
0

我對CMake來說很新,現在我試圖用https://colmap.github.io/來編譯COLMAP軟件。它編譯的模塊,但是當涉及到連接失敗與錯誤的數目一樣鏈接libfreeimage/libtiff時CMake/error

/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `[email protected]_4.0' 

我有libfreeimage並通過恰當的包(libfreeimage-dev /目錄的libtiff4-DEV)安裝的libtiff。我還添加了的libtiff明確地依賴於CMakeLists檔案具有以下

find_package(TIFF REQUIRED) 

set(COLMAP_LIBRARIES 
... 
${FREEIMAGE_LIBRARIES} 
${TIFF_LIBRARIES} 

我必須設置庫作爲CMake的,文件明確某處有動態鏈接?或者還有什麼可能是這個問題?

回答

0

看起來libfreeimage.so試圖使用TIFF庫,例如包括在您的項目TIFF:

find_package(TIFF REQUIRED) 
if (TIFF_FOUND) 
    include_directories(${TIFF_INCLUDE_DIRS}) 
    target_link_libraries(yourprojectname ${TIFF_LIBRARIES}) 
endif(TIFF_FOUND) 
相關問題