Build OpenCV 4.1.1 from source Raspbian OS. OpenCV 4.x requires c++11

Failure for cmake command when building opencv from source. Output at link bellow →
Any clues on how to get past this? Default standard used by cmake seems to be c++14. I know I should change it or somehow overwrite the defaults for cmake but I don’t know how.


try this


Hello, I did try adding the parameter to the top of the CMakeLists.txt file, however the result is unchanged.

I tried this for vs 2017


and I find this flag in cmakeoutput in C++ flags (Release): /std:c++17 /D _CRT_SECURE_NO_DEPRECATE…

of course you must give the good flag for your compiler