D:\opencv2.4.3\opencv\build\include\opencv2\flann\any.h:60: error: cannot use typeid with -fno-rtti
Hi I'm new to opencv, when I run my first opencv2.4.3 example in qt creator, the following errors come up:
\Qt\4.8.3\mkspecs\win32-g++" -o debug\main.o ..\qtConsole\main.cpp
In file included from ..\..\opencv2.4.3\opencv\build\include/opencv2/flann/params.h:33,
from ..\..\opencv2.4.3\opencv\build\include/opencv2/flann/flann_base.hpp:41,
from ..\..\opencv2.4.3\opencv\build\include/opencv2/flann/flann.hpp:50,
from ..\..\opencv2.4.3\opencv\build\include\opencv/cv.h:69,
from ..\qtConsole\main.cpp:2:
..\..\opencv2.4.3\opencv\build\include/opencv2/flann/any.h: In member function 'virtual const std::type_info& cvflann::anyimpl::typed_base_any_policy<T>::type()':
..\..\opencv2.4.3\opencv\build\include/opencv2/flann/any.h:60: error: cannot use typeid with -fno-rtti
..\..\opencv2.4.3\opencv\build\include/opencv2/flann/any.h: In member function 'T& cvflann::any::cast()':
..\..\opencv2.4.3\opencv\build\include/opencv2/flann/any.h:248: error: cannot use typeid with -fno-rtti
..\..\opencv2.4.3\opencv\build\include/opencv2/flann/any.h: In member function 'const T& cvflann::any::cast() const':
..\..\opencv2.4.3\opencv\build\include/opencv2/flann/any.h:257: error: cannot use typeid with -fno-rtti
..\..\opencv2.4.3\opencv\build\include/opencv2/flann/any.h: In member function 'bool cvflann::any::empty() const':
..\..\opencv2.4.3\opencv\build\include/opencv2/flann/any.h:266: error: cannot use typeid with -fno-rtti
..\..\opencv2.4.3\opencv\build\include/opencv2/flann/any.h: In member function 'bool cvflann::any::has_type()':
..\..\opencv2.4.3\opencv\build\include/opencv2/flann/any.h:286: error: cannot use typeid with -fno-rtti
In file included from ..\..\opencv2.4.3\opencv\build\include/opencv2/flann/flann_base.hpp:42,
from ..\..\opencv2.4.3\opencv\build\include/opencv2/flann/flann.hpp:50,
from ..\..\opencv2.4.3\opencv\build\include\opencv/cv.h:69,
from ..\qtConsole\main.cpp:2:
..\..\opencv2.4.3\opencv\build\include/opencv2/flann/saving.h: In function 'cvflann::IndexHeader cvflann::load_header(FILE*)':
..\..\opencv2.4.3\opencv\build\include/opencv2/flann/saving.h:113: error: exception handling disabled, use -fexceptions to enable
mingw32-make[1]: Leaving directory `D:/qtApp/qtConsole-build-Desktop-Debug'
mingw32-make[1]: *** [debug/main.o] Error 1
mingw32-make: *** [debug] Error 2
00:03:58: The process "D:\Qt\mingw\bin\mingw32-make.exe" exited with code 2.Blockquote
But if I remove the "cv.h" from include then it compile normally,then after run just prompt a black command window with no picture show.
OS:windowXP qt:4.8.3 OpenCV2.4.3(Using the Pre-built Libraries)