# opencv and qt

Hello, I'm having trouble compiling opencv with mingw32. I have a project which needs opencv, qt, and ffmpeg.

In the .pro file, I have these lines:

win32 {
INCLUDEPATH += \
"C:\opencv\include" \
"C:\FFmpeg\1.2.1\include"
LIBS += \
-L"C:\opencv\lib" \
-L"C:\FFmpeg\1.2.1\lib"
}


I will work on qtcreator, and to compile opencv, I use CMAKE and mingw32.

My question is, do I need to tick WITH_QT and WITH_FFMPEG? QT is already installed, and will be found by qtcreator, so I don't need it with opencv, am I right?

And same question for FFMPEG, as there is a different path for FFMPEG, I will download FFMPEG, and compile it myself, so I think I don't need to tick WITH_FFMPEG....

I'm new to this kind of stuff, and I have to admit that I'm a bit lost....

Thanks for your help, Florian

edit retag close merge delete

## Comments

yes, you will need WITH_QT. it's cmake, which needs this information, not qtcreator.

no, you don't need to dl/compile ffmpeg, if you tick the box, it should use the already supplied dll.

( 2014-07-22 02:50:51 -0500 )edit

Ok thank you, but even though there is a particular path to FFMPEG in the pro file, I don't have to download and compile it? Thanks for your help, I will try that

( 2014-07-22 03:08:31 -0500 )edit

if you are using mingw, you will have to build the opencv libs first using cmake. that's what those flags are for.

then you can use cmake again, to build a pro file for your actual code.

( 2014-07-22 03:13:15 -0500 )edit