ptran / idla-person-reid

dlib implementation of the "Improved Deep Learning Architecture for Person Re-Identification"
31 stars 11 forks source link

Cann't link to HDF5 #6

Closed z-pc closed 6 years ago

z-pc commented 6 years ago

Hello @ptran516 I build HDF5 1.8.20 by Cmake from a tutorial of hdfgroup. I'm try to test this project on Windows ( cpu only) by Cmake (generate for VS2015 64bit). In Cmake, I configure: HDF5_CXX_LIBRARY: [HDF5Project]/build/bin/Release/libhdf5_cpp.lib HDF5_DIFF_EXCUTABLE: [HDF5Project]/build/bin/Release/h5diff.exe HDF5_DIR: I link to a folder where include source (bin,c++,config,examples,fortran,hl,m4,realease_docs, src ......) I linked DLIB_DIR, generate OK But when I build solution by VS, It raise error: "idla.lib(dataset.obj) : error LNK2019: unresolved external symbol H5check_version referenced in function "void cdecl load_cuhk03_dataset(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::vector<class person_set,class std::allocator > &,class std::vector<class std::vector<int,class std::allocator >,class std::allocator<class std::vector<int,class std::allocator > > > &,enum cuhk03_dataset_type,long,long)" (?load_cuhk03_dataset@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAV?$vector@Vperson_set@@V?$allocator@Vperson_set@@@std@@@2@AEAV?$vector@V?$vector@HV?$allocator@H@std@@@std@@V?$allocator@V?$vector@HV?$allocator@H@std@@@std@@@2@@2@W4cuhk03_dataset_type@@JJ@Z) 4>libhdf5_cpp.lib(H5File.obj) : error LNK2001: unresolved external symbol H5check_version 4>libhdf5_cpp.lib(H5Library.obj) : error LNK2001: unresolved external symbol H5check_version 4>libhdf5_cpp.lib(H5OcreatProp.obj) : error LNK2001: unresolved external symbol H5dont_atexit 4>libhdf5_cpp.lib(H5LaccProp.obj) : error LNK2001: unresolved external symbol H5dont_atexit 4>libhdf5_cpp.lib(H5PredType.obj) : error LNK2001: unresolved external symbol H5dont_atexit 4>libhdf5_cpp.lib(H5DcreatProp.obj) : error LNK2001: unresolved external symbol H5dont_atexit 4>libhdf5_cpp.lib(H5PropList.obj) : error LNK2001: unresolved external symbol H5dont_atexit 4>libhdf5_cpp.lib(H5Library.obj) : error LNK2001: unresolved external symbol H5dont_atexit 4>libhdf5_cpp.lib(H5DataSpace.obj) : error LNK2001: unresolved external symbol H5dont_atexit 4>libhdf5_cpp.lib(H5DxferProp.obj) : error LNK2001: unresolved external symbol H5dont_atexit 4>libhdf5_cpp.lib(H5FaccProp.obj) : error LNK2001: unresolved external symbol H5dont_atexit 4>libhdf5_cpp.lib(H5FcreatProp.obj) : error LNK2001: unresolved external symbol H5dont_atexit 4>libhdf5_cpp.lib(H5DataSpace.obj) : error LNK2019: unresolved external symbol H5Screate referenced in function "public: cdecl H5::DataSpace::DataSpace(enum H5S_class_t)" (??0DataSpace@H5@@QEAA@W4H5S_class_t@@@Z) 4>libhdf5_cpp.lib(H5DataSpace.obj) : error LNK2019: unresolved external symbol H5Screate_simple referenced in function "public: cdecl H5::DataSpace::DataSpace(int,unsigned int64 const *,unsigned int64 const )" (??0DataSpace@H5@@QEAA@HPEB_K0@Z) 4>libhdf5_cpp.lib(H5DataSpace.obj) : error LNK2019: unresolved external symbol H5Sset_extent_simple referenced in function "public: void cdecl H5::DataSpace::setExtentSimple(int,unsigned int64 const ,unsigned int64 const *)const " (?setExtentSimple@DataSpace@H5@@QEBAXHPEB_K0@Z) 4>libhdf5_cpp.lib(H5DataSpace.obj) : error LNK2019: unresolved external symbol H5Scopy referenced in function "public: void cdecl H5::DataSpace::copy(class H5::DataSpace const &)" (?copy@DataSpace@H5@@QEAAXAEBV12@@Z) 4>libhdf5_cpp.lib(H5DataSpace.obj) : error LNK2019: unresolved external symbol H5Sclose referenced in function "public: virtual void cdecl H5::DataSpace::close(void)" (?close@DataSpace@H5@@UEAAXXZ) 4>libhdf5_cpp.lib(H5DataSet.obj) : error LNK2001: unresolved external symbol H5Sclose ........... ........... ..........." Is there something wrong?

z-pc commented 6 years ago

I solve this problem. Linker -> General: add /lib directory. Linker -> Input: link to all *.lib in /lib directory C/C++ -> General: add /include directory