OpenCV 4.x+ requires enabled C++11 support
Recently I finished the installation of OpenCV 4.1.0 and I tried to execute a simple code.
Following this tutorial
But I have this error while compiling
And my project include the line for c++11 too
Looking for on this forum and google I can't find a solution that works for me.
Some advice for me?
If you are using a recent version of Qt 5, then you don't even need to set the C++11 flag as it has been made mandatory since Qt 5.7.
What version of Qt are you using ?
Why are you using a compiler as old as MinGW 4.4 ?
That could be the reason, be cause when I add the Qt mark on CMake to build OpenCV it fail with some directories
the reason is just i'm working in an older project that is using that compiler.
what do you think?
Update both the compiler and Qt version. Qt 4 has reached end of life since a few years now.
Ok, Working without problems on Qt 5.12
@Hugo-Mayorga you did it? i also try to build opencv on Qt 5.12,but I failed, I meet this problem i386 architecture of input file `CMakeFiles\opencv_world.dir/objects.a(vs_version.rc.obj)' is incompatible with i386:x86-64 output . Do you have any ideas? By the way ,what's your Cmake version?
@lso70 My CMake is 3.14.3, I don't know what could be the problem, I just follow the video tutorial of my main post and link the g++ and gcc with the folder on Qt 5.12 version and that was all. mmm I remember some problem With DirectX/OpenGl option too, but is not the case.
@Hugo-Mayorga em.....I still failed,can u share your build library on git?or email?my gmail is firstname.lastname@example.org u very much!