Closed inkImage closed 7 years ago
You also need to link to libhdf5_hl_cpp.so
and libhdf5_cpp.so
. In face_swap/face_swap/CMakeLists.txt
, add /path/to/libhdf5_hl_cpp.so
and /path/to/libhdf5_cpp.so
to target_link_libraries(face_swap ... )
after ${HDF5_LIBRARIES}
(#L38)
Both files are most likely included in your anaconda2's library directory (/home/zmce/anaconda2/lib/
, as are libhdf5_hl.so and libhdf5.so).
Don't rely on the libraries that come with Anaconda. Download the binaries from the official site or build your own version of HDF5.
Hi, @hoamle , It is be fixed.Thanks
Hi, @inkImage I get the same error, but I am not clearly have to fix it. I can't find ${HDF5_LIBRARIES} in CMakeList.txt. Could you help me? Thanks.
@hoamle According to your suggestion. I change the CMakeList.txt as following. But my question still exist. Please give me some suggestion. Thanks very much! if(MSVC)
if(DEFINED HDF5_DIR) list(APPEND CMAKE_MODULE_PATH ${HDF5_DIR}) endif() find_package(HDF5 COMPONENTS C HL CXX REQUIRED) set(HDF5_LIBRARIES hdf5-shared hdf5_cpp-shared) set(HDF5_HL_LIBRARIES hdf5_hl-shared) target_link_libraries(face_swap "/usr/lib/x86_64-linux-gnu/libhdf5_cpp.so") target_link_libraries(face_swap "/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so") else() find_package(HDF5 COMPONENTS HL REQUIRED) endif()
My libhdf5_cpp.so and libhdf5_hl_cpp.so are located in /usr/lib/x86_64-linux-gnu.
@tjusxh You need to edit the CMakeList.txt in subdirectory ./face_swap (i.e. face_swap/face_swap/CMakeLists.txt, not the one at the project root (i.e. not face_swap/CMakeLists.txt).
I just edited the previous comment to make it clearer.
Hello, When I make the projcect, it is wrong.The information below.Can you give me some suggestion.Thanks.
Make: face_swap-master/build$ make [ 9%] Built target cv_gl [ 50%] Built target iris_sfs [ 81%] Built target face_swap [ 86%] Linking CXX executable face_swap_image ../face_swap/libface_swap.a(basel_3dmm.cpp.o): In function `face_swap::readH5Dataset(H5::H5File make[2]: [face_swap_image/face_swap_image] Error 1 make[1]: [face_swap_image/CMakeFiles/face_swap_image.dir/all] Error 2 make: *** [all] Error 2