我对 CMake 很陌生,现在我正在尝试使用它从https://colmap.github.io/编译 COLMAP 软件。它编译模块,但是在链接时失败并出现许多错误,例如
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFReadEncodedStrip@LIBTIFF_4.0'
我通过 apt 包(libfreeimage-dev / libtiff4-dev)安装了 libfreeimage 和 libtiff。我还使用以下内容将 libtiff 显式添加到 CMakeLists-Files 中的依赖项中
find_package(TIFF REQUIRED)
和
set(COLMAP_LIBRARIES
...
${FREEIMAGE_LIBRARIES}
${TIFF_LIBRARIES}
我是否必须将库设置为在 CMake-File 中的某处显式地具有动态链接?或者还有什么问题?