Results 1 to 6 of 6

Thread: Problem - QT + OpenCV + Windows 7

  1. #1
    Join Date
    Nov 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Question 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

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default 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.

  3. #3
    Join Date
    Nov 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default 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 =(
    Last edited by StinkyCat; 19th November 2010 at 17:53.

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default 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.

  5. #5
    Join Date
    Nov 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default 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!

  6. #6
    Join Date
    Nov 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default 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.

Similar Threads

  1. Problem - QT + OpenCV + Windows 7
    By StinkyCat in forum Newbie
    Replies: 0
    Last Post: 19th November 2010, 17:15
  2. Qt Creator Problem with QtCreator + OpenCV
    By rastru in forum Qt Tools
    Replies: 0
    Last Post: 28th July 2010, 22:33
  3. OpenCv Problem
    By danics in forum Qt Programming
    Replies: 1
    Last Post: 13th April 2010, 10:40
  4. Problem wth Opencv & Qt 4
    By Casper2004 in forum Qt Programming
    Replies: 0
    Last Post: 28th September 2009, 09:33
  5. I've got a qt&opencv problem.
    By eralvc in forum Installation and Deployment
    Replies: 2
    Last Post: 23rd October 2008, 09:58

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.