PDA

View Full Version : Can't get the ImageMagick Magick++ library to work.



gergnnud
1st April 2015, 07:44
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 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?

jefftee
1st April 2015, 07:56
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?



LIBS += -L$$PWD/../../../../../opt/local/lib/ -lMagick++

My guess is that your INCLUDEPATH and DEPENDPATH should also use ImageMagick instead of ImageMagick-6.