flann-lib / flann

Fast Library for Approximate Nearest Neighbors
http://people.cs.ubc.ca/~mariusm/flann
Other
2.22k stars 646 forks source link

FLANN : Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) for Windows #439

Open xiaoxiaobx opened 4 years ago

xiaoxiaobx commented 4 years ago

Hello,

1, Created a build directory 2, Set CMake SOURCE code path - /flann-master 3, Set CMake Build binaries path - /flann-master/build 4, Cmake .. is run error following

ERROR: 1,Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (found version "") 2.Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 3,CMake Error at src/matlab/CMakeLists.txt:71 (message): Cannot find MATLAB or Octave instalation. Make sure that the 'bin' directory from the MATLAB instalation or that mkoctfile is in PATH

hdf5 library not found, not compiling flann_example.cpp -- Could NOT find LATEX (missing: LATEX_COMPILER)

xiaoxiaobx commented 4 years ago

Hello,

1, Created a build directory 2, Set CMake SOURCE code path - /flann-master 3, Set CMake Build binaries path - /flann-master/build 4, Cmake .. is run error following

ERROR: 1,Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (found version "") 2.Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY) 3,CMake Error at src/matlab/CMakeLists.txt:71 (message): Cannot find MATLAB or Octave instalation. Make sure that the 'bin' directory from the MATLAB instalation or that mkoctfile is in PATH

hdf5 library not found, not compiling flann_example.cpp -- Could NOT find LATEX (missing: LATEX_COMPILER)

Sorry ,not in Windows,but for ubuntu.

rimmartin commented 4 years ago

Hi @xiaoxiaobx, depending on your use(mine was using within pcl) I build flann with

git clone https://github.com/mariusmuja/flann.git flann6
cd flann6
git rev-list -n 1 --before=2018-08-10 origin/master
git checkout `git rev-list -n 1 --before=2018-08-10 origin/master`

rm -rf build

mkdir -p ./build
cd build
#cmake --help-policy CMP0012
cmake --version
ccmake -DCMAKE_BUILD_TYPE=Release -DUSE_OPENMP=ON -DHDF5_IS_PARALLEL=OFF -DHDF5_DIR=/home/roger/Software/hdf5-1_10_5 -DHDF5_C_COMPILER_EXECUTABLE=/home/roger/Software/hdf5-1_10_5/dist/bin/h5cc  -DHDF5_DIFF_EXECUTABLE=/home/roger/Software/hdf5-1_10_5/dist/bin/h5diff -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_MATLAB_BINDINGS=OFF -DHDF5_C_INCLUDE_DIR=/home/roger/Software/hdf5-1_10_5/dist/include -DHDF5_hdf5_LIBRARY_RELEASE=/home/roger/Software/hdf5-1_10_5/dist/lib/libhdf5.so -DHDF5_hdf5_LIBRARY_DEBUG=/home/roger/Software/hdf5-1_10_5/dist/lib/libhdf5.so -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX=`pwd`/../dist ..

now the going back to before=2018-08-10 is to avoid lz4 dependency. Found I needed to turn off a lot of other functionality butif you want the testing then you will need gtest installed and avaliable.

this builds with cmake 3.8.1 but not 3.14 or 3.15

AndrewAndHelen commented 3 years ago

@rimmartin I'm using this library,thank you very much!