Ask Your Question
0

D:\opencv2.4.3\opencv\build\include\opencv2\flann\any.h:60: error: cannot use typeid with -fno-rtti

asked 2013-01-11 10:26:47 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Hi I'm new to opencv, when I run my first opencv2.4.3 example in qt creator, the following errors come up: image description

\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)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-01-11 10:46:10 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

You try to build OpenCV dependent program without RTTI (Run Time Type Information) support (-fno-rtti compiler flag). OpenCV does not support build without RTTI. Check your application build flags.

edit flag offensive delete link more

Comments

I cannot find RTTI item when rebuilding OpenCV in CMake.

lookeroo gravatar imagelookeroo ( 2013-01-11 19:23:46 -0600 )edit

Question Tools

Stats

Asked: 2013-01-11 10:26:47 -0600

Seen: 1,940 times

Last updated: Jan 11 '13