{"action":"created","issue":{"url":"https://api.github.com/repos/mariusmuja/flann/issues/337","repository_url":"https://api.github.com/repos/mariusmuja/flann","labels_url":"https://api.github.com/repos/mariusmuja/flann/issues/337/labels{/name}","comments_url":"https://api.github.com/repos/mariusmuja/flann/issues/337/comments","events_url":"https://api.github.com/repos/mariusmuja/flann/issues/337/events","html_url":"https://github.com/mariusmuja/flann/issues/337","id":224047602,"node_id":"MDU6SXNzdWUyMjQwNDc2MDI=","number":337,"title":"FLANN example compile error  in vs2015 ","user":{"login":"liulin1995","id":19664374,"node_id":"MDQ6VXNlcjE5NjY0Mzc0","avatar_url":"https://avatars0.githubusercontent.com/u/19664374?v=4","gravatar_id":"","url":"https://api.github.com/users/liulin1995","html_url":"https://github.com/liulin1995","followers_url":"https://api.github.com/users/liulin1995/followers","following_url":"https://api.github.com/users/liulin1995/following{/other_user}","gists_url":"https://api.github.com/users/liulin1995/gists{/gist_id}","starred_url":"https://api.github.com/users/liulin1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liulin1995/subscriptions","organizations_url":"https://api.github.com/users/liulin1995/orgs","repos_url":"https://api.github.com/users/liulin1995/repos","events_url":"https://api.github.com/users/liulin1995/events{/privacy}","received_events_url":"https://api.github.com/users/liulin1995/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-04-25T07:36:32Z","updated_at":"2018-08-21T08:42:18Z","closed_at":"2017-04-27T01:08:38Z","author_association":"NONE","body":"I try to compile flann 1.9.1 and run the  flann example to examine whether I  succeed  or  failed .\r\nI create a new project ,and the main code is \r\n```\r\n\r\n#include <flann/flann.hpp>\r\n#include <flann/io/hdf5.h>\r\n\r\n#include <stdio.h>\r\n\r\nusing namespace flann;\r\n\r\nint main(int argc, char** argv)\r\n{\r\n\tint nn = 3;\r\n\r\n\tMatrix<float> dataset;\r\n\tMatrix<float> query;\r\n\tload_from_file(dataset, \"dataset.hdf5\", \"dataset\");\r\n\tload_from_file(query, \"dataset.hdf5\", \"query\");\r\n\r\n\tMatrix<int> indices(new int[query.rows*nn], query.rows, nn);\r\n\tMatrix<float> dists(new float[query.rows*nn], query.rows, nn);\r\n\r\n\t// construct an randomized kd-tree index using 4 kd-trees\r\n\tIndex<L2<float> > index(dataset, flann::KDTreeIndexParams(4));\r\n\tindex.buildIndex();\r\n\r\n\t// do a knn search, using 128 checks\r\n\tindex.knnSearch(query, indices, dists, nn, flann::SearchParams(128));\r\n\r\n\tflann::save_to_file(indices, \"result.hdf5\", \"result\");\r\n\r\n\tdelete[] dataset.ptr();\r\n\tdelete[] query.ptr();\r\n\tdelete[] indices.ptr();\r\n\tdelete[] dists.ptr();\r\n\r\n\treturn 0;\r\n}\r\n```\r\nand I get some error :\r\n```\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _LZ4_decompress_safe，该符号在函数 \"private: void __thiscall flann::serialization::LoadArchive::decompressAndLoadV10(struct _iobuf *)\" (?decompressAndLoadV10@LoadArchive@serialization@flann@@AAEXPAU_iobuf@@@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _LZ4_setStreamDecode，该符号在函数 \"private: void __thiscall flann::serialization::LoadArchive::initBlock(struct _iobuf *)\" (?initBlock@LoadArchive@serialization@flann@@AAEXPAU_iobuf@@@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _LZ4_decompress_safe_continue，该符号在函数 \"private: void __thiscall flann::serialization::LoadArchive::loadBlock(char *,unsigned int,struct _iobuf *)\" (?loadBlock@LoadArchive@serialization@flann@@AAEXPADIPAU_iobuf@@@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _LZ4_resetStreamHC，该符号在函数 \"private: void __thiscall flann::serialization::SaveArchive::initBlock(void)\" (?initBlock@SaveArchive@serialization@flann@@AAEXXZ) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _LZ4_compress_HC_continue，该符号在函数 \"private: void __thiscall flann::serialization::SaveArchive::flushBlock(void)\" (?flushBlock@SaveArchive@serialization@flann@@AAEXXZ) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5open，该符号在函数 \"int __cdecl flann::`anonymous namespace'::get_hdf5_type<char>(void)\" (??$get_hdf5_type@D@?A0x3ab585e3@flann@@YAHXZ) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5check_version，该符号在函数 \"void __cdecl flann::load_from_file<float>(class flann::Matrix<float> &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$load_from_file@M@flann@@YAXAAV?$Matrix@M@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5Dcreate2，该符号在函数 \"void __cdecl flann::save_to_file<int>(class flann::Matrix<int> const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$save_to_file@H@flann@@YAXABV?$Matrix@H@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5Dopen2，该符号在函数 \"void __cdecl flann::load_from_file<float>(class flann::Matrix<float> &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$load_from_file@M@flann@@YAXAAV?$Matrix@M@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5Dclose，该符号在函数 \"void __cdecl flann::load_from_file<float>(class flann::Matrix<float> &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$load_from_file@M@flann@@YAXAAV?$Matrix@M@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5Dget_space，该符号在函数 \"void __cdecl flann::load_from_file<float>(class flann::Matrix<float> &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$load_from_file@M@flann@@YAXAAV?$Matrix@M@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5Dread，该符号在函数 \"void __cdecl flann::load_from_file<float>(class flann::Matrix<float> &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$load_from_file@M@flann@@YAXAAV?$Matrix@M@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5Dwrite，该符号在函数 \"void __cdecl flann::save_to_file<int>(class flann::Matrix<int> const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$save_to_file@H@flann@@YAXABV?$Matrix@H@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5Eset_auto2，该符号在函数 \"void __cdecl flann::save_to_file<int>(class flann::Matrix<int> const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$save_to_file@H@flann@@YAXABV?$Matrix@H@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019:unresolved external symbol  _H5Fcreate，该符号在函数 \"void __cdecl flann::save_to_file<int>(class flann::Matrix<int> const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$save_to_file@H@flann@@YAXABV?$Matrix@H@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5Fopen，该符号在函数 \"void __cdecl flann::load_from_file<float>(class flann::Matrix<float> &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$load_from_file@M@flann@@YAXAAV?$Matrix@M@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5Fclose，该符号在函数 \"void __cdecl flann::load_from_file<float>(class flann::Matrix<float> &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$load_from_file@M@flann@@YAXAAV?$Matrix@M@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5Screate_simple，该符号在函数 \"void __cdecl flann::save_to_file<int>(class flann::Matrix<int> const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$save_to_file@H@flann@@YAXABV?$Matrix@H@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5Sclose，该符号在函数 \"void __cdecl flann::load_from_file<float>(class flann::Matrix<float> &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$load_from_file@M@flann@@YAXAAV?$Matrix@M@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2019: unresolved external symbol  _H5Sget_simple_extent_dims，该符号在函数 \"void __cdecl flann::load_from_file<float>(class flann::Matrix<float> &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)\" (??$load_from_file@M@flann@@YAXAAV?$Matrix@M@0@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z) 中被引用\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_SCHAR_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_UCHAR_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_SHORT_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_USHORT_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_INT_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_UINT_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_LONG_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_ULONG_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_FLOAT_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_DOUBLE_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_LDOUBLE_g\r\n1>c:\\users\\liu\\documents\\visual studio 2015\\Projects\\flann_test\\Debug\\flann_test.exe : fatal error LNK1120: 31 个无法解析的外部命令\r\n```\r\n\r\nIn cmake ,I only turn BUILD_C_BINDINGS on ,and in vs2015:\r\nthe include path is :C:\\Codes\\flann-1.9.1\\src\\cpp\r\nthe lib path is :C:\\Codes\\flann-1.9.1\\build\\lib\\Debug\r\nthe libs I add :\r\n![image](https://cloud.githubusercontent.com/assets/19664374/25373299/a92f7dd0-29cb-11e7-9d02-b617e32e32c6.png)\r\n\r\n-----\r\nIn cmake I also try to turn some other on except matlab and python bindings ,but I also failed .\r\nI got 6 libs and I add all,but the flann_example will also throw errors:\r\n \r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_SCHAR_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_UCHAR_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_SHORT_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_USHORT_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_INT_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_UINT_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_LONG_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_ULONG_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_FLOAT_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_DOUBLE_g\r\n1>flann_test.obj : error LNK2001: unresolved external symbol _H5T_NATIVE_LDOUBLE_g\r\n\r\nI will appreciate you very much if you can give me some suggestions !!!"},"comment":{"url":"https://api.github.com/repos/mariusmuja/flann/issues/comments/414598177","html_url":"https://github.com/mariusmuja/flann/issues/337#issuecomment-414598177","issue_url":"https://api.github.com/repos/mariusmuja/flann/issues/337","id":414598177,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDU5ODE3Nw==","user":{"login":"liulin1995","id":19664374,"node_id":"MDQ6VXNlcjE5NjY0Mzc0","avatar_url":"https://avatars0.githubusercontent.com/u/19664374?v=4","gravatar_id":"","url":"https://api.github.com/users/liulin1995","html_url":"https://github.com/liulin1995","followers_url":"https://api.github.com/users/liulin1995/followers","following_url":"https://api.github.com/users/liulin1995/following{/other_user}","gists_url":"https://api.github.com/users/liulin1995/gists{/gist_id}","starred_url":"https://api.github.com/users/liulin1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liulin1995/subscriptions","organizations_url":"https://api.github.com/users/liulin1995/orgs","repos_url":"https://api.github.com/users/liulin1995/repos","events_url":"https://api.github.com/users/liulin1995/events{/privacy}","received_events_url":"https://api.github.com/users/liulin1995/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T08:42:18Z","updated_at":"2018-08-21T08:42:18Z","author_association":"NONE","body":"sorry, I just see it now and I forget most of the procedure.\nmaybe the answer is:\n\n*Add \"_HDF5USEDLL_\" to the project\nproperty--C/C++--preprocessor-preprocessor definition list, save, recompile*\n\nbut i'm not sure.\nwhat i remember is that there is some error in hdf5 library configure. you\nneed to configure it properly. perhaps you need some help from google, the\nkeyword should be hdf5.\n\n\nMrCairo90 <notifications@github.com> 于2018年8月18日周六 上午4:28写道：\n\n> I also would like to know the solution to this issue\n>\n> —\n> You are receiving this because you modified the open/close state.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/mariusmuja/flann/issues/337#issuecomment-413979596>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ASwN9ivRFHATPcuWaNTI9oGm6r4LsNG_ks5uRydRgaJpZM4NHGm2>\n> .\n>\n"}}
{"actor":{"display_login":"liulin1995"}}