Ask Your Question

Error compiling OpenCV 3.0 with opencv_contrib on CentOS 6.5

asked 2015-02-14 14:14:39 -0500

genx gravatar image

I'm trying to compile OpenCV with contribution modules .

when I compile OpenCV alone it compiles fine, but when I include the extra modules it doesn't seem to able to include the opencv headers and I get this

In file included from /tmp/opencv/opencvcont/modules/text/include/opencv2/text.hpp:42, from /tmp/opencv/opencvcont/modules/text/src/precomp.hpp:46, from /tmp/opencv/opencv-2.4.9/release/modules/text/opencv_text_pch_dephelp.cxx:1: /tmp/opencv/opencvcont/modules/text/include/opencv2/text/erfilter.hpp:47:28: error: opencv2/core.hpp: No such file or directory In file included from /tmp/opencv/opencvcont/modules/text/include/opencv2/text.hpp:42, from /tmp/opencv/opencvcont/modules/text/src/precomp.hpp:46, from /tmp/opencv/opencv-2.4.9/release/modules/text/opencv_text_pch_dephelp.cxx:1: /tmp/opencv/opencvcont/modules/text/include/opencv2/text/erfilter.hpp:66: error: variable قcv::text::CV_EXPORTS cv::text::ERStatق has initializer but incomplete type

this is my cmake command


and this is one of the modules makelist (i tried to manually include opecv & opencv2 headers but didnt work)


include_directories(${CMAKE_CURRENT_BINARY_DIR} /usr/local/include) ...

edit retag flag offensive close merge delete


sorry, tried, same results, thanks though

genx gravatar imagegenx ( 2015-02-14 14:31:43 -0500 )edit

oh wait, you're trying to compile the contrib_repo with opencv2.4.9 ? that most likely won't work. you will need to build opencv3.0, and then try again with the contrib repo.

berak gravatar imageberak ( 2015-02-16 04:31:09 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2015-02-26 11:16:06 -0500

genx gravatar image

thanks @break, I dont know who did I not notice the release, i had it mixedup with other version, it worked totally fine with OpenCV 3.0

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-02-14 14:14:39 -0500

Seen: 1,145 times

Last updated: Feb 26 '15