Results 1 to 5 of 5

Thread: Linking Error Qt OpenCV

  1. #1
    Join Date
    Jul 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Smile Linking Error Qt OpenCV

    Hi Guys,
    I'm new in this Forum, I have red a lot of thread about problem similar to mine one but no one help me.
    I explain my problem:
    -I made a project with a qt GUI, and I need to use OpenCV library to open and show a video in this GUI.
    -When I build my project no errors are shown but when I run It show this message:
    Qt Code:
    1. Starting C:\Users\ut\Documents\projectQt\video-build-desktop\debug\video.exe...
    2. C:\Users\ut\Documents\projectQt\video-build-desktop\debug\video.exe exited with code -1073741511
    To copy to clipboard, switch view to plain text mode 

    So I've read lot of thread and I've understood that I've got problem with dll. But What are these dlls???
    Some thread speak about dlls like QtCore4.dll et al. but I've included all necessary path in system variable. The same I've done for OpenCV dlls path(OpenCV\*\bin and OpenCV\*\lib).

    So I tried to comment all openCV functions I call in my project and application run correctly.

    So I think have a problem with openCV dlls but I can't understand what problem, this is my .pro file:

    Qt Code:
    1. QT += core gui
    2.  
    3. TARGET = video
    4. TEMPLATE = app
    5.  
    6.  
    7. SOURCES += main.cpp\
    8. mainwindow.cpp
    9.  
    10. HEADERS += mainwindow.h
    11.  
    12. FORMS += mainwindow.ui
    13.  
    14. INCLUDEPATH += C:\OpenCV\OpenCV-2.3.0\build\install\include
    15.  
    16. LIBS += -LC:\OpenCV\OpenCV-2.3.0\build\install\lib
    17.  
    18. LIBS += -llibopencv_core230 -llibopencv_imgproc230 -llibopencv_highgui230
    To copy to clipboard, switch view to plain text mode 

    I'll be glad to everyone help me!!!

    Thank You EveryBody.

    I forgot to say that I'am running on:

    Win 7 64bit, with QtCreator

    the OpenCV library run correctly if I use it stand-alone for example using the cvCreateWindow

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Linking Error Qt OpenCV

    So I've read lot of thread and I've understood that I've got problem with dll.
    Usually when a DLL is missing the system will pop up a message telling you which DLL it could not find.
    Since you are not getting this message, I think your problem is a segmentation fault and not a missing DLL.
    Run your application in a debugger, and see which line crashes.
    Post that part of code here, and we can try and help you further.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jul 2011
    Posts
    12
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4

    Default Re: Linking Error Qt OpenCV

    Have you tried in debug mode using the step-by-step mode ? I don't think it is a link problem but a bug when you use OpenCV maybe an exception or an assertion is raised

  4. #4
    Join Date
    Aug 2011
    Posts
    1
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Linking Error Qt OpenCV

    I have the trouble with set up QT and OpenCV too.
    I am using OpenCV 2.3 and QT creator 4.73 Win 7 64 bits.
    my main.cpp is copied from OpenCV 2 cooked book:"display the image"
    The QT recognize the function when I type cv::im -> then it pop up cv::imread()
    but don't know why it shows the error.
    I tried running qmake. It runs with warning: pro:26 Unescape backslashes are deprecated
    then try to run make: It returns error: make is not recognized as an internal or external command, operable program or batch file
    Where should the file"make" be in?
    Thanks so much
    Attached Images Attached Images
    Last edited by Chuong98; 27th August 2011 at 21:05.

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Linking Error Qt OpenCV

    If you are using the Qt SDK with MinGW then "make" is actually "mingw32-make".
    If you are using Microsoft's compiler then "make" is "nmake" I think.

    The warning from qmake is because you have a path or paths in your pro file that look like:
    C:\Some\Path\To\Something
    rather than escaping the backslashes:
    C:\\Some\\Path\\To\\Something
    or using forward slashes and letting qmake switch them for you.
    Last edited by ChrisW67; 28th August 2011 at 05:07.

  6. The following 2 users say thank you to ChrisW67 for this useful post:

    Chuong98 (28th August 2011), savior (4th October 2011)

Similar Threads

  1. Linking Error
    By amitpatel22 in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 28th June 2011, 13:40
  2. Qt OpenCV SIGSEGV error help
    By bobo in forum Newbie
    Replies: 3
    Last Post: 13th June 2011, 21:03
  3. Linking NokiaQT with OpenCV
    By tan88122 in forum Newbie
    Replies: 1
    Last Post: 14th March 2011, 08:16
  4. Install opencv on ubuntu error, please help
    By cooper in forum General Programming
    Replies: 2
    Last Post: 16th July 2009, 13:46

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.