Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I properly build OpenCV 2.3.1 for Qt 4.7 on windows XP?

http://www.barbato.us/2011/03/18/using-opencv2-within-qtcreator-in-windows-2/

I was following this post above on how to use opencv with Qtcreator. it is mentioned that i had to add *.lib files to my pro in Qtcreator.

I did just that but out of the box those *.lib files that come with opencv were compiled for Microsoft VS. so I again followed another online post on how to build opencv with minGW for use with Qtcreator, here is the link: http://knowtheabc.wordpress.com/2011/02/25/windows-opencv-and-qt-creator/

but I am not able to get those *.lib files generated, I get *.dll and *.dll.a

I tried to add them to my Qt project but it does not work! How do I generate those Lib files?

like image 903
xedus Avatar asked Nov 13 '22 13:11

xedus


1 Answers

Sounds like you are confused about what version to use. If you want to use QtCreator/MinGW you need to build OpenCV with MinGW and use the MinGW version of Qt. Here is the MinGW build of Qt. You will need to choose the MinGW Makefiles target for the CMake build of OpenCV. Here is the CMake install guide for OpenCV.

like image 141
mevatron Avatar answered Dec 30 '22 13:12

mevatron