I am facing problem with the cmake command while compiling opencv on Ubuntu 16.04. When I execute the cmake command, I get the error
CMake Error at CMakeLists.txt:11 (message):
FATAL: In-source builds are not allowed.
You should create a separate directory for build files.
I have extracted the opencv source file in a folder named opencv-3.3.1
Then I have followed all the processes mentioned in this site
I use the following commands ::
cmake -D CMA
KE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=OFF -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.3.1/modules -D PYTHON_EXECUTABLE=~/.virtualenvs/cv/bin/python -D BUILD_EXAMPLES=ON ..
But I am getting this error!
What can be the possible problem?
The CMakeError.log shows
error "C++11 is not supported
I have tried adding
set(CMAKE_CXX_FLAGS "-std=c++11") to the beginning of the CMakeLists.txt and also included the flag
-DENABLE_CXX11=ON to the
CMAKE command flags. But nothing seems to work.