Results 1 to 2 of 2

Thread: Can't get the ImageMagick Magick++ library to work.

  1. #1
    Join Date
    Sep 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11

    Default Can't get the ImageMagick Magick++ library to work.

    This is driving me nuts.

    I have tried for many weeks it seems to get QT to recognise the Magick++ library properly without success.

    I have tried various ImageMagick installs to no avail.

    Extract from my .pro file

    Qt Code:
    1. win32 {
    2. RC_FILE = tlcm.rc
    3. }
    4.  
    5. mac {
    6. ICON =
    7. QMAKE_INFO_PLIST = Info_mac.plist
    8. TARGET = My-App
    9.  
    10. # No 64-bit Flash on Mac, so build the browser 32-bit
    11. contains(QT_CONFIG, x86) {
    12. CONFIG -= x86_64
    13. CONFIG += x86
    14. }
    15. contains(QT_CONFIG, ppc) {
    16. CONFIG -= ppc64
    17. CONFIG += ppc
    18. }
    19. }
    20.  
    21. SUBDIRS += \
    22. imageviewer.pro
    23.  
    24. #Libraries
    25. LIBS += -L$$PWD/../../../../../opt/local/lib/ -lgphoto2
    26.  
    27. INCLUDEPATH += $$PWD/../../../../../opt/local/include/gphoto2
    28. DEPENDPATH += $$PWD/../../../../../opt/local/include/gphoto2
    29.  
    30. LIBS += -L$$PWD/../../../../../opt/local/lib/ -lMagick++-6
    31.  
    32. INCLUDEPATH += $$PWD/../../../../../opt/local/include/ImageMagick-6
    33. DEPENDPATH += $$PWD/../../../../../opt/local/include/ImageMagick-6
    To copy to clipboard, switch view to plain text mode 

    So gphoto2 is recognised and working but Magick++-6 is not. The error on compile of course is;
    library not found for -lMagick++-6
    linker command failed with exit code 1 (use -v to see invocation)

    The symlink is definitely there in /opt/local/lib/ as libMagick++-6.Q16.dylib

    I tried re-installing from macports today and relinking via ‘Add Library’ but still no success. The reason for a re-install of ImageMagick was because I have previously got QT to recognise this library but then was confronted with a huge list of errors about quantum depth etc. - errors in the library files themselves so that can’t be right.

    Running on a Mac of course (Yosemite, QT 5.3.1). Any thoughts?

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Can't get the ImageMagick Magick++ library to work.

    Quote Originally Posted by gergnnud View Post
    LIBS += -L$$PWD/../../../../../opt/local/lib/ -lMagick++-6

    INCLUDEPATH += $$PWD/../../../../../opt/local/include/ImageMagick-6
    DEPENDPATH += $$PWD/../../../../../opt/local/include/ImageMagick-6[/CODE]
    I believe the library should just be Magick++. Have you tried the following?

    Qt Code:
    1. LIBS += -L$$PWD/../../../../../opt/local/lib/ -lMagick++
    To copy to clipboard, switch view to plain text mode 
    My guess is that your INCLUDEPATH and DEPENDPATH should also use ImageMagick instead of ImageMagick-6.

Similar Threads

  1. Using Imagemagick lib
    By Mobility in forum Qt Programming
    Replies: 1
    Last Post: 3rd February 2014, 11:01
  2. How to convert multi page Magick++ Image to QImage?
    By eadorean in forum Qt Programming
    Replies: 2
    Last Post: 9th September 2013, 18:28
  3. Loading image with Magick++, displaying with Qt
    By RSX in forum Qt Programming
    Replies: 5
    Last Post: 29th April 2013, 13:42
  4. ImageMagick and QT
    By manojmka in forum Qt Programming
    Replies: 16
    Last Post: 10th April 2008, 14:30
  5. Qt + ImageMagick
    By bpetty in forum Newbie
    Replies: 8
    Last Post: 23rd April 2007, 21:08

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
  •  
Qt is a trademark of The Qt Company.