Problem - QT + OpenCV + Windows 7
Hi all!
I just started using QT on my windows 7 laptop (Qt creator 2.0.1, Qt 4.7). I have a program that works on ubuntu given by a professor (with qt and opencv). The thing is everytime i try to build it, i get on the compile output the following:
Running build steps for project Camera...
Starting: "c:/qt/2010.05/qt/bin/qmake.exe" C:/Qt/Projectos/Camera/Camera.pro -r -spec win32-g++
The process "c:/qt/2010.05/qt/bin/qmake.exe" exited normally.
Starting: "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" -w
mingw32-make: Entering directory `C:/Qt/Projectos/Camera'
C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Qt/Projectos/Camera'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\2010.05\qt\include\QtCore" -I"..\..\2010.05\qt\include\QtGui" -I"..\..\2010.05\qt\include" -I"..\..\..\OpenCV2.1\include" -I"..\..\2010.05\qt\include\ActiveQt" -I"debug" -I"..\..\2010.05\qt\mkspecs\win32-g++" -o debug\main.o main.cpp
g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\Camera.exe debug/main.o -L"c:\Qt\2010.05\qt\lib" -lmingw32 -lqtmaind -LC:/OpenCV2.1/lib -lcv210 -lcvaux210 -lhighgui210 -lcxcore210 -lQtGuid4 -lQtCored4
mingw32-make[1]: Leaving directory `C:/Qt/Projectos/Camera'
mingw32-make: Leaving directory `C:/Qt/Projectos/Camera'
The process "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" exited normally.
...And nothing happens..
I installed openCV 2.1. Is there something else i gotta do before compiling any program? i read on the net something about PATH and variables but no clue what to do..
if anyone could help me, i would really appreciate :) thks
ps: when i try to run it from the Qt i get the following message on the application output:
Starting C:\Qt\Projectos\Camera\debug\Camera.exe...
C:\Qt\Projectos\Camera\debug\Camera.exe exited with code -1073741515
Re: Problem - QT + OpenCV + Windows 7
That error corresponds to 0xC0000135 which means the program couldn't start because a component (like a dll for example) could not be found.
The compiling and linking seems to be correct. At least, there are no errors in the output you posted.
Check if all the DLL files can be found. The easiest way is to put them in the application folder I guess.
Re: Problem - QT + OpenCV + Windows 7
hum... wat dll? in the folder my prof gave me i have only 3 files: Camera.pro camera.pro.user main.cpp should i have dlls there? or the dlls u mentioned r the ones from opencv?
Added after 4 minutes:
just saw this post http://www.qtcentre.org/threads/2524...-Qt-and-OpenCV and that's exactly the same problem i have i guess. Google didnt help me out till now =(
Re: Problem - QT + OpenCV + Windows 7
Yes, opencv or any other library (like Qt) you need for your program. Make sure that these dll's are installed in a folder that the system looks in for searching dll's. The installer of opencv should do that automatically.
On linux it is very easy to see which components can't be found by using a tool like ldd. On windows there's a tool called dependency walker.
Re: Problem - QT + OpenCV + Windows 7
im gonna try the dependency walker when i get home.
anyway what about the path and variable thing? i mean i just wanted a pdf or something telling me exactly what i had to do since the begining of the installation of both software to get them working well together :x google still didnt help me out!
Re: Problem - QT + OpenCV + Windows 7
Well.. I finally figured out what to do. For those with the same problem as me, here goes the site that explains clearly what to do:
http://wiki.epfl.ch/lasa/opencv
For those who use Qt Creator instead of Visual Studio, u can go to Tools -> Options. then write on the filter "path". on the right u will have the environment variables. add there the list u find on the website i wrote before and i hope it works, as it worked with me :)
thks to tbscope for the support.