I want to build an application using the OpenCV library built with cmake. First I downloaded the sources for opencv4.5.5. I created in that folder a subfolder mingwbuild and from there I can the command "cmake ../ -G "MinGW Makefiles" Then I ran the command "mingw32-make install" and it took 2 hours to compile. I then used cmake again to build a project, like described in the first answer here: Configuring an c++ OpenCV project with Cmake When I then ran the generated .exe, it would give me a runtime error "Qt5OpenGl.dll and Qt5Test.dll could not be found"
So I downloaded QtOpenGl.dll with MSYS2 from here https://packages.msys2.org/package/mingw-w64-x86_64-qt5-base with the command "pacman -S mingw-w64-x86_64-qt5-base" When I then run my opencvtest.exe , it says that it could not find the entry point of some method in QtOpenGl.dll . So the version or something must be wrong?
When searching for the package in the MSYS2 terminal, it says there are 10 packages I can download and install. The first four are:
$ pacman -Ss qt5-base
mingw32/mingw-w64-i686-qt5-base 5.15.3+kde+r174-2 (mingw-w64-i686-qt5) A cross-platform application and UI framework (mingw-w64) mingw32/mingw-w64-i686-qt5-base-debug 5.15.3+kde+r174-2 (mingw-w64-i686-qt5-debug) A cross-platform application and UI framework (mingw-w64) mingw64/mingw-w64-x86_64-qt5-base 5.15.3+kde+r174-2 (mingw-w64-x86_64-qt5) [installed] A cross-platform application and UI framework (mingw-w64) mingw64/mingw-w64-x86_64-qt5-base-debug 5.15.3+kde+r174-2 (mingw-w64-x86_64-qt5-debug)
Maybe if I choose the release package, I also have to set the option -DCMAKE_BUILD_TYPE=Release when invoking cmake?
Option x86 means 64-bit package and without x86, it means 32-bit packages. How can I figure out which of these I do need?
Any help is appreciated.