我点击了这个链接,在我输入 make 之后,它变成了这样:
[ 38%] Built target lib tiff <br>
[ 38%] Built target opencv_core <br>
[ 38%] Built target opencv_imgproc <br>
[ 38%] Built target lib jasper <br>
[ 38%] Built target libjpeg <br>
[ 38%] Built target opencv_highgui <br>
[ 38%] Building CXX object modules/flann/CMakeFiles/opencv_flann.dir/src/flann.o <br>
In file included from /Users/indrawinarta/Downloads/OpenCV- 2.3.1/modules/flann/src/flann.cpp:29: <br>
In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/src/precomp.hpp:17:<br>
In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/all_indices.h:42:
/Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/lsh_index.h:89:81: error:
no matching constructor for initialization of 'cvflann::LshIndexParams'
...input_data, const IndexParams& params = LshIndexParams(),<br>
^
/Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/lsh_index.h:59:5: note:
candidate constructor not viable: requires 3 arguments, but 0 were
provided
LshIndexParams(unsigned int table_number, unsigned int key_size, ...
^
/Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/lsh_index.h:57:8: note:
candidate constructor (the implicit copy constructor) not viable: requires
1 argument, but 0 were provided
struct LshIndexParams : public IndexParams <br>
^
In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/src/flann.cpp:29: <br>
In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/src/precomp.hpp:10: <br>
In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/index_testing.h:39: <br>
In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/nn_index.h:39: <br>
In file included from /Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/params.h:33: <br>
/Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/any.h:88:67: error:
call to function 'operator<<' that is neither visible in the template
definition nor found by argument-dependent lookup
virtual void print(std::ostream& out, void* const* src) { out << ... <br>
^
/Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/any.h:136:44: note: <br>
in instantiation of member function <br>
'cdiggins::anyimpl::big_any_policy<cdiggins::anyimpl::empty_any>::print' <br>
requested here <br>
static typename choose_policy<T>::type policy; <br>
^
/Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/any.h:159:18: note: <br>
in instantiation of function template specialization <br>
'cdiggins::anyimpl::get_policy<cdiggins::anyimpl::empty_any>' requested <br>
here <br>
: policy(anyimpl::get_policy<anyimpl::empty_any>()), object(NULL) <br>
^
/Users/indrawinarta/Downloads/OpenCV-2.3.1/modules/flann/include/opencv2/flann/any.h:276:22: note: <br>
'operator<<' should be declared prior to the call site or in namespace <br>
'cdiggins::anyimpl' <br>
inline std::ostream& operator <<(std::ostream& out, const any& any_val) <br><br>
^
2 errors generated. <br>
make[2]: *** [modules/flann/CMakeFiles/opencv_flann.dir/src/flann.o] Error 1 <br>
make[1]: *** [modules/flann/CMakeFiles/opencv_flann.dir/all] Error 2 <br>
make: *** [all] Error 2 <br>
如何解决?