Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cannot get the ImageMagick Magick++ library to link properly
Forum Update on Monday, May 27th 2025

Cannot get the ImageMagick Magick++ library to link properly

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gergnnud
    wrote on last edited by
    #1

    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

    win32 {
       RC_FILE = tlcm.rc
    }
    
    mac {
        ICON =
        QMAKE_INFO_PLIST = Info_mac.plist
        TARGET = My-App
    
        # No 64-bit Flash on Mac, so build the browser 32-bit
        contains(QT_CONFIG, x86) {
            CONFIG -= x86_64
            CONFIG += x86
        }
        contains(QT_CONFIG, ppc) {
            CONFIG -= ppc64
            CONFIG += ppc
        }
    }
    
    SUBDIRS += \
        imageviewer.pro
    
    #Libraries
    LIBS += -L$$PWD/../../../../../opt/local/lib/ -lgphoto2
    
    INCLUDEPATH += $$PWD/../../../../../opt/local/include/gphoto2
    DEPENDPATH += $$PWD/../../../../../opt/local/include/gphoto2
    
    LIBS += -L$$PWD/../../../../../opt/local/lib/ -lMagick++-6
    
    INCLUDEPATH += $$PWD/../../../../../opt/local/include/ImageMagick-6
    DEPENDPATH += $$PWD/../../../../../opt/local/include/ImageMagick-6
    

    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 had previously got QT to recognise this library but then I was confronted with a huge list of errors about quantum depth etc. - errors in the library files so that can’t be right. Now doesn't even link using the same method.

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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      LIBS += -lMagick++-6.Q16

      should to the trick

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved