compilation error when #include opencv.h with vs2010
Hi, I'm using vs2010 and openCV2.4.9
When I add to a project the line
#include <opencv\cv.h>
I get the following error:
1>d:\opencv\opencv2.4.9\build\include\opencv2\flann\any.h(70): error C2061: syntax error : identifier 'dest' 1> d:\opencv\opencv2.4.9\build\include\opencv2\flann\any.h(69) : while compiling class template member function 'void cvflann::anyimpl::small_any_policy<t>::copy_from_value(const void ,void *)' 1> with 1> [ 1> T=const char * 1> ] 1> d:\opencv\opencv2.4.9\build\include\opencv2\flann\any.h(157) : see reference to class template instantiation 'cvflann::anyimpl::small_any_policy<t>' being compiled 1> with 1> [ 1> T=const char * 1> ] 1> d:\opencv\opencv2.4.9\build\include\opencv2\flann\any.h(217) : see reference to function template instantiation 'cvflann::anyimpl::base_any_policy *cvflann::anyimpl::get_policy<t>(void)' being compiled 1> with 1> [ 1> T=const char * 1> ] 1> d:\opencv\opencv2.4.9\build\include\opencv2\flann\any.h(187) : see reference to function template instantiation 'cvflann::any &cvflann::any::assign<const char*="">(const T &)' being compiled 1> with 1> [ 1> T=const char * 1> ]
Please advice.
How come i have no views for this question?
please try to include "opencv2/opencv..hpp" instead of the deprecated c-headers.
Above answer really worked. Thanx a lot!!