OpenCV 4.x+ requires enabled C++11 support
-
wrote on 13 May 2019, 17:17 last edited by
Recently I finished the installation of OpenCV 4.1.0 and I tried to execute a simple code.
Following this tutorial
https://www.youtube.com/watch?v=ZOSu-2Oju-A&t=272sBut 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?
Thanks!
-
wrote on 14 May 2019, 16:35 last edited by
Ok, Working without problems on Qt 5.12
Thanks!
-
HI,
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 ? -
HI,
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 ?wrote on 13 May 2019, 20:57 last edited by@SGaist
Qt 4.8That 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.
-
wrote on 14 May 2019, 16:35 last edited by
Ok, Working without problems on Qt 5.12
Thanks!
-
Ok, Working without problems on Qt 5.12
Thanks!
wrote on 30 May 2019, 13:15 last edited by@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?
-
@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?
wrote on 5 Jun 2019, 16:32 last edited by@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.
-
@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.
wrote on 6 Jun 2019, 03:07 last edited by@Hugo-Mayorga em.....I still failed,can u share your build library on git?or email?my gmail is juddgadison@gmail.com.thank u very much!