Qt 5.6.1 with Opencv
-
Hi guys, Can you be careful? Please to read you pro file code. why did you use debug lib twice?
I said not to use
\
in any path. Please check you code carefully. -
did you include opencv head files?
-
Hi,
In addition to all the good clues @joeQ provided, the main problem here is: trying to build an application with MinGW and link to a C++ library built with Visual Studio. It's not possible. You have to use a MinGW build of OpenCV to link to your application. Or use a VS build of Qt to link to your OpenCV lib built with Visual Studio. Note that prior to Visual Studio 2017, you also have to exactly match the versions of Visual Studio used to build everything C++ you might use in your project.
VS2017 has backward compatibility but only with VS2015.
-
@SGaist hey I tried to build opencv using cmake following this tutorial
https://www.youtube.com/watch?v=ZOSu-2Oju-A
there are several errors while building the code
I followed all the steps in the video but the output is not same as of the video tutorial, I hope you understood the basic problem please help. -
You have to tell CMake where to find Qt in order for it to build its libhighgui with the Qt backend.
-
@navya.dubey
Hilike
cmake .. -DCMAKE_PREFIX_PATH="C:\Qt\5.7\msvc2015\lib\cmake\Qt5" -
Where to add it
-
@navya.dubey
Sorry, i miss scrolled and edited your post.You use it as commandline option when you call cmake as shown
-
No, you make sure there is path to cmake
then you go to the project folder where the Cmake.tx file is and then
call cmakeif no paths, you can fully tell
c:\programfile\whatever\cmake .. OPTION
Same way as done here
https://forum.qt.io/topic/82074/creating-a-multi-purpose-node-editor-if-there-is-none-available/20
its also a Cmake project -
You can also add that using the GUI you showed in your post.