Results 1 to 2 of 2

Thread: OpenCV again (Linker Problems)

  1. #1

    Default OpenCV again (Linker Problems)

    Hi Forum

    I know, there a lot of posts about openCV and the qtCreator, i think i have similar problems linke many other, but also with reading the other posts, i could not solve my Problems, so forgive me that i ask this again:

    I Programmed in Netbeans and switched recently to qtCreator. I have a OpenCV application that compiles great in qtCreator, but the linker... I am compiling on Mac OSX 10.6.7 with qtCreator 2.1.0 (x64). I compiled openCV 2.2.0.

    Not the problem, the linker outputs:
    Qt Code:
    1. [...]
    2. g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o ShikkoV3.app/Contents/MacOS/ShikkoV3 main.o shikkogui.o Controller.o Calibrator.o PositionConverter.o Platter.o Plate.o ObjectFinder.o Object.o Napkin.o Logger.o Knife.o init.o ImageLoader.o ImageDrawer.o Image.o Glas.o Fork.o Communicator.o moc_shikkogui.o -F/Users/USER/QtSDK/Desktop/Qt/473/gcc/lib -L/Users/USER/QtSDK/Desktop/Qt/473/gcc/lib -L/usr/local/lib/ -L/Users/USER/src/OpenCV-2.2.0/build/lib/ -lcv -lcxcore -lhighgui -framework QtWebKit -framework QtGui -framework QtCore
    3. ld: library not found for -lcv
    4. collect2: ld returned 1 exit status
    5. make: *** [ShikkoV3.app/Contents/MacOS/ShikkoV3] Error 1
    To copy to clipboard, switch view to plain text mode 

    I think this is simply because the linker cant find the librarys. Here is my .pro:
    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. # Project created by QtCreator 2011-04-15T13:51:54
    4. #
    5. #-------------------------------------------------
    6.  
    7. QT += core gui
    8. QT += webkit
    9.  
    10. TARGET = ShikkoV3
    11. DEPENDPATH += .
    12. TEMPLATE = app
    13.  
    14. INCLUDEPATH += /usr/local/include/opencv/
    15. INCLUDEPATH += /usr/local/include/opencv2/
    16.  
    17.  
    18. LIBS += -L/usr/local/lib/
    19. LIBS += -L/Users/USER/src/OpenCV-2.2.0/build/lib/
    20. LIBS += -lcv -lcxcore -lhighgui
    21.  
    22. SOURCES += main.cpp\
    23. shikkogui.cpp \
    24. Controller.cpp \
    25. Calibrator.cpp \
    26. PositionConverter.cpp \
    27. Platter.cpp \
    28. Plate.cpp \
    29. ObjectFinder.cpp \
    30. Object.cpp \
    31. Napkin.cpp \
    32. Logger.cpp \
    33. Knife.cpp \
    34. init.cpp \
    35. ImageLoader.cpp \
    36. ImageDrawer.cpp \
    37. Image.cpp \
    38. Glas.cpp \
    39. Fork.cpp \
    40. Communicator.cpp
    41.  
    42. HEADERS += shikkogui.h \
    43. Controller.h \
    44. Image.h \
    45. ImageLoader.h \
    46. shikko.h \
    47. Logger.h \
    48. ImageDrawer.h \
    49. PositionConverter.h \
    50. Platter.h \
    51. Plate.h \
    52. ObjectFinder.h \
    53. Object.h \
    54. Napkin.h \
    55. Knife.h \
    56. init.h \
    57. Glas.h \
    58. Fork.h \
    59. Communicator.h \
    60. Calibrator.h
    61.  
    62. FORMS += shikkogui.ui
    To copy to clipboard, switch view to plain text mode 

    And here whats in the directories included in the LIB statement:
    Qt Code:
    1. ls -1t /Users/USER/src/OpenCV-2.2.0/build/lib/
    2. cv.so
    3. libopencv_legacy.2.2.0.dylib
    4. libopencv_legacy.2.2.dylib
    5. libopencv_legacy.dylib
    6. libopencv_contrib.2.2.0.dylib
    7. libopencv_contrib.2.2.dylib
    8. libopencv_contrib.dylib
    9. libopencv_features2d.2.2.0.dylib
    10. libopencv_features2d.2.2.dylib
    11. libopencv_features2d.dylib
    12. libopencv_haartraining_engine.a
    13. libopencv_calib3d.2.2.0.dylib
    14. libopencv_calib3d.2.2.dylib
    15. libopencv_calib3d.dylib
    16. libopencv_gpu.2.2.0.dylib
    17. libopencv_gpu.2.2.dylib
    18. libopencv_gpu.dylib
    19. libopencv_objdetect.2.2.0.dylib
    20. libopencv_objdetect.2.2.dylib
    21. libopencv_objdetect.dylib
    22. libopencv_highgui.2.2.0.dylib
    23. libopencv_highgui.2.2.dylib
    24. libopencv_highgui.dylib
    25. libopencv_video.2.2.0.dylib
    26. libopencv_video.2.2.dylib
    27. libopencv_video.dylib
    28. libopencv_imgproc.2.2.0.dylib
    29. libopencv_imgproc.2.2.dylib
    30. libopencv_imgproc.dylib
    31. libopencv_ml.2.2.0.dylib
    32. libopencv_ml.2.2.dylib
    33. libopencv_ml.dylib
    34. libopencv_ts.2.2.0.dylib
    35. libopencv_ts.2.2.dylib
    36. libopencv_ts.dylib
    37. libopencv_flann.2.2.0.dylib
    38. libopencv_flann.2.2.dylib
    39. libopencv_flann.dylib
    40. libopencv_core.2.2.0.dylib
    41. libopencv_core.2.2.dylib
    42. libopencv_core.dylib
    43. libopencv_gpu_pch_dephelp.a
    44. libopencv_objdetect_pch_dephelp.a
    45. libopencv_test_core_pch_dephelp.a
    46. libopencv_test_pch_dephelp.a
    47. libopencv_ml_pch_dephelp.a
    48. libopencv_contrib_pch_dephelp.a
    49. libopencv_legacy_pch_dephelp.a
    50. libopencv_video_pch_dephelp.a
    51. libopencv_features2d_pch_dephelp.a
    52. libopencv_flann_pch_dephelp.a
    53. libopencv_calib3d_pch_dephelp.a
    54. libopencv_core_pch_dephelp.a
    55. libopencv_highgui_pch_dephelp.a
    56. libopencv_imgproc_pch_dephelp.a
    To copy to clipboard, switch view to plain text mode 

    Can someone pleas give me a hint what im doing wrong?

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

    Default Re: OpenCV again (Linker Problems)

    cv.so
    Why is that not a *.dylib like the others?
    ==========================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.

Similar Threads

  1. opencv-qt-mac
    By ireneluis in forum Qt Programming
    Replies: 0
    Last Post: 16th March 2010, 16:24
  2. Qt and OpenCV
    By malorie in forum Newbie
    Replies: 2
    Last Post: 7th March 2010, 15:57
  3. OpenCv & Qt4
    By switch in forum Qt Programming
    Replies: 0
    Last Post: 4th August 2009, 16:12
  4. JAI vs. OpenCV vs. ITK
    By tpieciak in forum General Programming
    Replies: 0
    Last Post: 8th July 2009, 14:45
  5. Qt4 Lib -- Linker Problems Qt4/OpenGL
    By Jackson.Shredder in forum Qt Programming
    Replies: 6
    Last Post: 19th January 2009, 19:22

Tags for this Thread

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.