flann-lib / flann

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

flann errors occur when pcl 1.10.0 is used #448

Open zengletian1491 opened 4 years ago

zengletian1491 commented 4 years ago

when pcl 1.10.0 is used, errors about flann 1.9.1 occur as follows:

  Code Interpretations Files Line
Error C2065 “flann_algorithm_t”: undeclared identifier d: \pcl\flann\include\flann\util\params.h 44
Error C2913 Explicit specialization;“flann::anyimpl::choose_policy” is not class template specialization d:\pcl\flann\include\flann\util\params.h 47
Error C2913 Explicit specialization;“flann::anyimpl::choose_policy” is not class template specialization d:\pcl\flann\include\flann\util\params.h 46
Error C2913 Explicit specialization;“flann::anyimpl::choose_policy” is not class template specialization d:\pcl\flann\include\flann\util\params.h 45
Error C2913 Explicit specialization;“flann::anyimpl::choose_policy” is not class template specialization d:\pcl\flann\include\flann\util\params.h 44
Error C2923 “flann::anyimpl::choose_policy”: “flann_algorithm_t” is not a valid template type variable for parameter “T” d:\pcl\flann\include\flann\util\params.h 44

Could you give me some suggestions? Thanks.

morejiik commented 4 years ago

With early version of PCL and/or flann it was working? Could you please give a code snippet? Or files to reproduce the issue?

Philipcjh commented 3 years ago

Maybe there is conflict between OpenCV and PCL because both libraries use flann. The solution is to raise the priority of PCL\3rdParty\FLANN . You need to move the path of PCL\3rdParty\FLANN above OpenCV both in Project-Properties-VC++ Directories-Include Directories and Project-Properties-VC++ Directories-Library Directories in Visual Studio. In addition, you need to do this change in Path of the Environment Variable in Advanced system settings.