Integrating OpenCV libraries in QtCreator on Windows
-
Then let's start at the beginning:
What compiler do you want to use ? Doesn't the OpenCV pre-built package give you what you need ? -
I want to use the mingw compiler, there is a folder in the pre-built package called mingw so I suppose this schould work, but it doesnt.
There are only *dll and *ddl.a files where I get the same errors as above.
-
You should rather use something like
@LIBS += -LC:/OpenCV/opencv_bin/install/mingw/whathever
-lopencv_highgui231d
-lopencv_core231d
etc...
@ -
Yeah thank you very much:) when I added these lines in the .pro file the project gets compiled.
@LIBS += -LC:/OpenCV/opencv_bin/install/lib/ -llibopencv_core231d
-llibopencv_highgui231dINCLUDEPATH += C:/OpenCV/opencv_bin/install/include
DEPENDPATH += C:/OpenCV/opencv_bin/install/include
@Unfortunaley after the compiling there is just showing up the console and nothing happends :(
-
No error message ?
-
no just the "qt_creator_stub.exe"
but this appears even when I uncomment the whole code
-
@mat = cv::imread("BM_Logo.JPG");@
relative path, in that case you should either copy the image in the same folder as your application or give the absolute path to it.
-
No doesnt change anything.
The strange thing is, even the "Hello World" doesnt appear if I use at least one function of the cv library only when I uncomment these functions the "hello world" appears.
the output window says:
bq. return value = -1073741515
and also the debugger crashes immediatly
edit:
I also tried compiling the project with the console, but when I start the .exe it says:
bq. The programm cannot be started, because the ..highgui249.dll is missing on this computer. Reinstall the programm ...
When I copy the dlls of opencv in the folder with the executable it says
bq. The programm cannot be started, because the ..QtCore4.dll is missing on this computer. Reinstall the programm ...
-
Looks like your OpenCV DLLs can't be found.
Go the run part of the Project panel, edit the PATH environment variable and add the path to the folder where the OpenCV dlls are located.
-
IT WORKS!!
Thank you very much:)
you definitely saved my day:)
-
You're welcome !
Since OpenCV is working now, please update the thread title prepending [solved] so other forum users may know solution has been found :)