Qt 5.4 OpenCV 2.4.11 Win 32 Configuration
Download CMake 2.8.2
Download OpenCV 2.4.11
Download Qt 5.4
Highly improtant note: The installation directory should not contain any space or non-English character, otherwise weird error would happen when building.
Open CMake 2.8.2, set the source and build directory:
Click "Configure", choose "MinGW Makefiles" and "Specify native compliers"
Set the C and C++ compiler from the Qt SDK
Don't forget to add the following to the system path:
C:\Qt\5.4\mingw491_32\bin
C:\Qt\Tools\mingw491_32\bin
Then click "Configure" and "Generate", then open cmd and go the build directory, and run "mingw32-make"
Highly important: You need to select "With_Qt" before click "Generate"!
When it is done, then run "mingw32-make install" and hit enter again
Use Qt Creator creates a new project, add following in the .pro file:
# Add OpenCV INCLUDEPATH += C:\opencv\mingw\install\include INCLUDEPATH += C:\opencv\mingw\install\include\opencv INCLUDEPATH += C:\opencv\mingw\install\include\opencv2 LIBS += -LC:\\opencv\\mingw\\bin \ libopencv_core2411 \ libopencv_highgui2411 \ libopencv_imgproc2411 \ libopencv_features2d2411 \ libopencv_calib3d2411 \