Results 1 to 8 of 8

Thread: Adding a library search path on Eclipse using QT Eclipse Integration

  1. #1
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Adding a library search path on Eclipse using QT Eclipse Integration

    Well, I am developing a computer vision application on Eclipse using OpenCV and QT Eclipse Integration.
    To use OpenCV, its necessary to add an library search path and some libraries to the GCC C++ linker. When I was using only OpenCV, it was fine, but when I try to do this on a QT Project, the project properties interface changes, and don't show these properties anymore... so I can't set then.
    So... someone know a way to set the libraries search path and linker?
    Thanks.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Adding a library search path on Eclipse using QT Eclipse Integration

    I don't know about eclipse integration since I never used it, but with qmake that would be INCLUDEPATH and LIBS.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    battousaihimura (18th November 2007)

  4. #3
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Adding a library search path on Eclipse using QT Eclipse Integration

    Thanks jpn, you solved my problems.

  5. #4
    Join Date
    Jan 2009
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Adding a library search path on Eclipse using QT Eclipse Integration

    Hi Everyone,

    Can anybody please elaborate on this? I am having the same problem and cant find where to add the openCV directories, libraries and searchpath.

    I have a QT program and an openCV program that work and just cant get them to play nice together. I made a normal C++ project for the openCV and used the QT GUI project for the QT project.

    I followed the instructions on this site (http://www.brindusescu.org/?q=node/26) but I keep getting "cant find -lcxcore".

    Here is my current project file.
    Qt Code:
    1. TEMPLATE = app
    2. TARGET = thesis2
    3. QT += core \
    4. gui \
    5. sql \
    6. network \
    7. opengl
    8. HEADERS += thesis2.h
    9. SOURCES += main.cpp \
    10. thesis2.cpp
    11. FORMS += thesis2.ui
    12. RESOURCES +=
    13. INCLUDEPATH += "C:\Program Files\OpenCV\cxcore\include" \
    14. "C:\Program Files\OpenCV\cv\include" \
    15. "C:\Program Files\OpenCV\cvaux\include" \
    16. "C:\Program Files\OpenCV\otherlibs\highgui"
    17. LIBS += -L/usr/local/lib \
    18. -lcxcore \
    19. -lcv \
    20. -lhighgui \
    21. -lcvaux
    To copy to clipboard, switch view to plain text mode 

    Thanks for any help.
    Last edited by derektaprell; 27th January 2009 at 10:43. Reason: updated contents

  6. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Adding a library search path on Eclipse using QT Eclipse Integration

    Add
    Qt Code:
    1. win32:LIBS += -L"C:\Program Files\OpenCV\cxcore\lib"
    To copy to clipboard, switch view to plain text mode 
    (or wherever the lib is).
    J-P Nurmi

  7. #6
    Join Date
    Jan 2009
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Adding a library search path on Eclipse using QT Eclipse Integration

    Thanks JPN. All in working order now.

    For anyone wanting the project files lines they are:

    Qt Code:
    1. INCLUDEPATH += "C:\Program Files\OpenCV\cxcore\include" \
    2. "C:\Program Files\OpenCV\cv\include" \
    3. "C:\Program Files\OpenCV\cvaux\include" \
    4. "C:\Program Files\OpenCV\otherlibs\highgui" \
    5. "C:\Program Files\OpenCV\cxcore\include"
    6. win32:LIBS += -L"C:\Program Files\OpenCV\lib"
    7. LIBS += -lcv \
    8. -lcvaux \
    9. -lhighgui \
    10. -lcxcore
    To copy to clipboard, switch view to plain text mode 

  8. #7
    Join Date
    Mar 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Adding a library search path on Eclipse using QT Eclipse Integration

    Hi @ all,
    thanks a lot for the replies on this topic! I had the same problem and also managed to create a combined QT/OpenCV-Project. My only issue now is that Auto-Completion does not work in this project for OpenCV primitives and functions. Furthermore, Eclipse remarks OpenCV include statements with "unresolved inclusion" (but builds the project perfectly...).
    Is there any way to fix this, so i can use Auto-Completion for both, QT and OpenCV

  9. #8
    Join Date
    Dec 2010
    Location
    Sri Lanka
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Adding a library search path on Eclipse using QT Eclipse Integration

    Hi All,

    Thanks a lot for the post. I also had the same problem of linking opencv with qt and now the problem solved . In my case I had to write -lcv210 instead of -lcv, because lib folder contains libraries like that.

Similar Threads

  1. MinGW Windows Library Search Path
    By zztop in forum Qt Programming
    Replies: 4
    Last Post: 26th March 2006, 16:18

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.