Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error compiling OpenCV 3.0 with opencv_contrib on CentOS 6.5

I'm trying to compile OpenCV with contribution modules https://github.com/Itseez/opencv_contrib .

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

cmake -D OPENCV_EXTRA_MODULES_PATH=/tmp/opencv/opencvcont/modules/ -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DWITH_OPENCL=OFF -DWITH_OPENEXR=OFF -DWITH_V4L=OFF

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

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})

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