I install Qt 5.10 latest version and opencv3.4.1 and I couldn't install the library in this version of Qt with Cmake can anybody help me to do it on my windows 10 64-bit please? I tried with this video also https://www.youtube.com/watch?v=ZOSu-2Oju-A and in cmd step I have this (picture in this link)
in this link also (( https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows )) I do all steps carefully but I didn't found the folder bin in opencv-build after do the steps and My OS is windows 10 64-bit thanks for help.
Note: I'm basing my answer more on [SO]: openCV mingw-32 error in cmd (the tools versions mentioned in the posted .pdf)
1. Preliminary considerations
At the beginning, I tried to build it using what I already had on my machine (Win 10):
The build process passed this stage (well, it failed somewhere below this point, I didn't check why exactly). Anyway, I thought that the build env that I used, and the suggested one were too far away, so I:
The problem at its core (as specified in comments, or Googleing the error) is that the g++ compiler doesn't use the C++11 standard (and protobuf source code requires it).
So, I did a little test: pasted the faulty code in a file (and added a dummy main), and tried it with the 2 MinGW installations.
code.py:
Output:
As seen, the older g++ needs
-std=c++0x
explicitly.Following the build steps, I got the same error as in the image below (I launched mingw32-make directly in protobuf's dir, to skip all the other stuff built before it):
2. Solutions
Both are done at cmake-gui level. After setting the paths:
Notes:
Since I'm very far away from being a CMake expert, before doing this, I empty the build dir to make sure that there's nothing left from previous build (of course the drawback is that everything is done again, which usually takes a long time)
Since I didn't enable parallel build, I didn't wait for the full build to finish (as it takes forever), but just checked that it passes this point
2.1 Force C++11 standard
Click "Add Entry" and set [CMake 3.1]: CXX_STANDARD:
And below, notice that the build passed point where it was failing before:
2.2 Skip protobuf build
Notes:
Search for protobuf related variables, and uncheck any that are in the BUILD or WITH groups (the blue lines):
And again the effect is below - the protobuf build no longer takes place (it comes just after libIlmImf):