Trouble Integrating Qt 5.3.1 with OpenCV 2.4.9 (Solved)
-
To my knowledge, yes.
Thanks for the reply.To start, I just downloaded the Qt/MinGW pack that came together. This did not work. I then read that the MinGW compiler that came in the bundle was the 32bit version. I then uninstalled Qt and the downloaded Qt without the compiler and got the 64bit version. This also did not work. (All the time I was updating my variable paths)
I also came to the conclusion that it was either the compiler that wasn't working correctly, or that my OpenCV libraries weren't fully defined.
Every time I try something new, it fails at the same place when it tries to link the highgui249.dll libraries.
alphaCharlie
-
Hi and welcome to devnet,
Before going further, what compiler do you have installed ?
What Qt package did you install ?
Did you saw that OpenCV provides pre-built libraries for several compilers ? Did you select the right path when linking to the libraries ? -
Compiler - MinGW 4.9.1 (32/64bit)
Qt - 5.3OpenCV 2.4.9 only supplies pre-built libraries for vc10, vc11, and vc12 I believe.
And I am almost positive that I am using the right paths when linking the libraries, which is why I am so confused.
alphaCharlie
-
Then you will have to first compile OpenCV with your MinGW version
-
Alright, well then this might sounds like a dumb question, how do I do that?
-
"Here":http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html you have the instructions
-
I followed those instructions and was able to compile openCV with minGW using the -make and -install commands quite easily.
After that, am I suppose to do the same process over again but this time including the With_Qt libraries within Cmake?
-
Not necessarily, Qt is used in OpenCV for the highgui library to show controls etc. So if you don't use it in your software there's no need for that.
-
I figured it out. The cause was the wrong library being linked to CMake. With the new installer for 5.3.1, it opts to a default download of winrt_x64, and msvc2013_64.
You need to manually include mingw482_32 when downloading Qt and set the paths to C:\Qt\5.3\mingw482_32 (My path) so that when including the With_Qt, it finds the correct libraries.
Thanks for the help.
-
Nice you found out !
You're welcome !
Now that you have it working, please update the thread title prepending [solved] so other forum users may know a solution has been found :)