已经安装了hdf5包,并且配置了路径,为什么出现如下错误???
./lib/libcaffe.so.1.0.0-rc3: undefined reference to H5LTget_dataset_ndims'
../lib/libcaffe.so.1.0.0-rc3: undefined reference toH5LTread_dataset_int'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to H5LTfind_dataset'
../lib/libcaffe.so.1.0.0-rc3: undefined reference toH5LTmake_dataset_double'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to H5LTmake_dataset_int'
../lib/libcaffe.so.1.0.0-rc3: undefined reference toH5LTread_dataset_float'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to H5LTmake_dataset_float'
../lib/libcaffe.so.1.0.0-rc3: undefined reference toH5LTget_dataset_info'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to H5LTread_dataset_string'
../lib/libcaffe.so.1.0.0-rc3: undefined reference toH5LTread_dataset_double'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `H5LTmake_dataset_string'
collect2: ld 返回 1
make[2]: * [tools/convert_imageset] 错误 1
make[1]: [tools/CMakeFiles/convert_imageset.dir/all] 错误 2
make: ** [all] 错误 2
If you are having difficulty building Caffe or training a model, please ask the caffe-users mailing list. If you are reporting a build error that seems to be due to a bug in Caffe, please attach your build configuration (either Makefile.config or CMakeCache.txt) and the output of the make (or cmake) command.
This looks like a duplicate of #3224 which has already been resolved. How is your problem different from that one?
I met a similar problem and solved it by modifying the file
---[ HDF5
find_package(HDF5 COMPONENTS HL REQUIRED)
include_directories(SYSTEM ${HDF5_INCLUDE_DIRS} ${HDF5_HL_INCLUDE_DIR})
list(APPEND Caffe_LINKER_LIBS ${HDF5_LIBRARIES})
list(APPEND Caffe_LINKER_LIBS ${HDF5_HL_LIBRARIES}) #added
Closing, assuming the given answer helped. If not, please reopen and provide further details, especially how the suggested solution failed.
Most helpful comment
I met a similar problem and solved it by modifying the file/cmake/Dependencies.cmake as following,
---[ HDF5
find_package(HDF5 COMPONENTS HL REQUIRED)
include_directories(SYSTEM ${HDF5_INCLUDE_DIRS} ${HDF5_HL_INCLUDE_DIR})
list(APPEND Caffe_LINKER_LIBS ${HDF5_LIBRARIES})
list(APPEND Caffe_LINKER_LIBS ${HDF5_HL_LIBRARIES}) #added