我尝试编译此存储库link,但是我陷入了CMake错误:找不到 ann_LIBRARIES 。在内部网中搜索时,我发现了我构建的ANN link,但我不知道如何在Cmake文件中给出绝对路径。而且我还安装了libflann1.9和libflann-dev,但仍然遇到相同的问题。
我有ubuntu 18.04和qt5,安装了boost lib,blas&lapack和libpng库。
cmake ..
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- serialization
-- filesystem
-- system
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'libxml++-2.6'
-- Found libxml++-2.6, version 2.40.1
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- system
-- filesystem
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- thread
-- chrono
-- system
-- date_time
-- atomic
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- filesystem
-- system
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.6.34")
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- filesystem
-- thread
-- system
-- chrono
-- date_time
-- atomic
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- filesystem
-- thread
-- serialization
-- program_options
-- regex
-- system
-- chrono
-- date_time
-- atomic
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- filesystem
-- program_options
-- regex
-- system
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- filesystem
-- program_options
-- system
-- Boost version: 1.65.1
-- Found the following Boost libraries:
-- filesystem
-- program_options
-- regex
-- system
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ann_LIBRARIES
linked by target "TrackingUtils" in directory /home/dhiren/Dev/FranksVelodyneAlgos/libTrackingUtils
-- Configuring incomplete, errors occurred!
See also "/home/dhiren/Dev/FranksVelodyneAlgos/build/CMakeFiles/CMakeOutput.log".
See also "/home/dhiren/Dev/FranksVelodyneAlgos/build/CMakeFiles/CMakeError.log".
谢谢
答案 0 :(得分:0)
最后,我能够编译代码库
我的程序如下:
cmake -Dann_LIBRARIES=/home/ann_1.1.2/lib/libANN.a ..
执行命令make
命令来编译代码了,我又遇到了ANN/ANN.h: No such file or directory
错误,我通过提供每个发生错误的文件的绝对路径#include </home/ann_1.1.2/include/ANN/ANN.h> //approximate) nearest neighbor
来解决了这个错误。显然提供绝对路径不是一个好主意。就这样感谢@Tsyvarev
希望这对某人有帮助。