visual studio 2008 - Using OpenCV 2.3 with Qt in QtCreator -



visual studio 2008 - Using OpenCV 2.3 with Qt in QtCreator -

as release of opencv 2.3 out, wanted compile , install latest release on system. work qt , qtcreator of course of study wanted able utilize in qt projects. i've tried several methods hours errors:

first try: compiling opencv 2.3 with_qt

first wanted did 2.2 release worked fine me. followed guide: http://knowtheabc.wordpress.com/2011/02/25/windows-opencv-and-qt-creator/

downloaded source code set cmake , told create mingw makefiles , specified paths g++.exe, gcc.exe , qmake.exe in c:\qt... paths, checked with_qt , generated makefiles release. built , installed in shell using mingw32-make , mingw32-make install

after completed successfully, needed add together paths ".pro" file , able build nice software uses opencv (back @ time used 2.2 release). lastly part described here: http://knowtheabc.wordpress.com/2011/02/25/opencv-in-qt/

so tried same 2.3 release compiled old release. builds illustration programme execute it, closes 1 time again , returns: -1073741515

second try: using pre-built opencv superpack using mingw

as first method didn't work tried utilize pre-build versions. though these don't have with_qt enabled, still wanted try.

so downloaded superpack, extracted , set somewhere. wanted same did before , added paths include folder , dlls ".pro" file:

includepath+= c:/workspace/opencv/opencv2.3/build/include libs+= c:/workspace/opencv/opencv2.3/build/x64/mingw/bin/*.dll

as compiler used mingw compiler comes current qt sdk. crashes while building:

c:/workspace/opencv/opencv2.3/build/x64/mingw/bin/libopencv_calib3d230.dll: file not recognized: file format not recognized collect2: ld returned 1 exit status mingw32-make[1]: *** [release\coindetector.exe] error 1 mingw32-make: *** [release] error 2

third try: second, using vc2008 compiler

i tried same thing vc2008 compiler comes qt sdk well. selected compiler , adapted path in ".pro" file use:

libs+= c:/workspace/opencv/opencv2.3/build/x64/vc9/bin/*.dll

but crashes error can't read dll:

c:/workspace/opencv/opencv2.3/build/x64/vc9/bin/opencv_calib3d230.dll : fatal error lnk1107: ungültige oder beschädigte datei: lesen bei 0x2f0 nicht möglich.

so here settings:

win7 professional x64 latest qt sdk installed (4.7.3) opencv 2.3 release

does have thought might wrong here? glad help!

i got qt 4.7.3 work opencv2.3. unfortunately had install vc++2008 express edition , cdb debugger microsoft (both freebies microsoft). part can develop opencv in both ide, vs 2008, , qt creator.

these settings of .pro file:

includepath += c:/opencv2.3/build/include includepath += c:/opencv2.3/build/include/opencv libs += c:/opencv2.3/build/x86/vc9/lib/opencv_calib3d230.lib libs += c:/opencv2.3/build/x86/vc9/lib/opencv_contrib230.lib libs += c:/opencv2.3/build/x86/vc9/lib/opencv_core230.lib libs += c:/opencv2.3/build/x86/vc9/lib/opencv_features2d230.lib libs += c:/opencv2.3/build/x86/vc9/lib/opencv_flann230.lib libs += c:/opencv2.3/build/x86/vc9/lib/opencv_highgui230.lib libs += c:/opencv2.3/build/x86/vc9/lib/opencv_imgproc230.lib libs += c:/opencv2.3/build/x86/vc9/lib/opencv_objdetect230.lib libs += c:/opencv2.3/build/x86/vc9/lib/opencv_video230.lib

remember, select msvc compiler in projects settings

i have tried don't know how many different approaches create work mingw, not right 1 far. i'm in windows 7 64 bits...but developing 32 bits, suppose if utilize x64 libraries might 64 bit projects work.

good luck,

andres

visual-studio-2008 qt opencv mingw qt-creator

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -