Cannot get the ImageMagick Magick++ library to link properly



  • 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?


  • Lifetime Qt Champion

    Hi,

    LIBS += -lMagick++-6.Q16

    should to the trick


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.