Home Building Opencv using cmake giving errors involving c++11
Reply: 0

Building Opencv using cmake giving errors involving c++11

user1320 Published in July 23, 2018, 1:10 pm

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 :: cd opencv-3.3.1/ mkdir build/ cd build/ 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.

Please help!!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.367724 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO