5.12.x Offline Installers [ Windows Host, 3.7 GB ]
But! None suitable for opencv cmake! I enabled this flag [ WITH_QT ] and for this flag [ Qt5_DIR ], i downloaded and extracted this QT [ 2) 5.15.x source packages ] and set this directory I do:
Nothing happened when I pressed the ‘configuration’ and 'generate ’ buttons on cmake, tell me cmake again : Qt5_DIR-NOTFOUND
again i downloaded [ Qt6 source packages ] and exatract, again…
But you need to install Qt, not just get those packages. Download the Qt online installer, chose a Qt library version and install it. It is correctly installed if you see the Qt creator in the Start menu.
To double-check, you can try to build an example project from the Welcome screen.
Now cmake should find Qt.
If you still encounter problems, try to set manually the Qt5_DIR cmake flag to [Qt install folder]/[Qt version]/[compiler]/lib/cmake/Qt5
I downloaded offline installer file [ 5.12.x Offline Installers, Windows Host, 3.7 GB ]
With your help, I set the path in cmake [ Qt5_DIR flag ], In cmake I pressed the configure and then generate buttons, no problem occurred and everything was done correctly.
i pressed “open project” button and build visual studio project, but show me 631 error!
Where is my mistake?
I disabled the BUILD_opencv_world flag in cmake → then build project in Visual Studio, all errors were from the opencv_highgui project. [ 631 error again ]
I rarely use Windows, but it’s a link error concerning the Qt libraries. Check if all the folders related to Qt (like Qt5Gui_DIR) was correctly configured in cmake.
If it still gives errors, try to add the Qt5 lib files manually in Visual studio Project settings -> Libraries.
yes all QT paths are correct (like Qt5Gui_DIR)
i change compiler? now i use mingw73_64, now i go try this : msvc2017_64
i use msvc2017_64 and build opencv - no error! - for what?
Why !!! After doing all this, I can not find QT dlls in this path :
OpenCV\4.5.4\build\install\x64\vc16\bin
note : i disabled this flag [ BUILD_opencv_world ]
for example i can find this 2 dll [ Qt5Widgets.dll, Qt5Widgetsd.dll ] in qt installation folder [ C:\Qt\Qt5.12.11\5.12.11\msvc2017_64 ], But I can not find them in the opencv installation folder!