Static IM libs with Qt
Posted: 2010-09-30T04:32:48-07:00
Hi,
I have Qt project where I'm using ImageMagick. My pro file looks like this:
CONFIG += qt
QT += opengl
INCLUDEPATH += /usr/local/include/ImageMagick/
HEADERS += /usr/local/include/ImageMagick/Magick++.h
HEADERS += ...
LIBS += /usr/local/lib/libMagick++.so
LIBS += /usr/local/lib/libMagickWand.so
LIBS += /usr/local/lib/libMagickCore.so
SOURCES += ...
I do qmake and then make. Everything compiles flawlessly. I want to link my application with static Image magick libs so I don't have to distribute them with app. I change pro file to this:
CONFIG += qt
QT += opengl
INCLUDEPATH += /usr/local/include/ImageMagick/
HEADERS += /usr/local/include/ImageMagick/Magick++.h
HEADERS += ...
LIBS += /usr/local/lib/libMagick++.a
LIBS += /usr/local/lib/libMagickWand.a
LIBS += /usr/local/lib/libMagickCore.a
SOURCES += ...
Now I'm getting lots of errors during linking. Here are some of them:
/usr/local/lib/libMagickCore.a(magick_libMagickCore_la-accelerate.o): In function `BindConvolveParameters':
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:337: undefined reference to `clCreateBuffer'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:343: undefined reference to `clCreateBuffer'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:349: undefined reference to `clCreateBuffer'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:359: undefined reference to `clSetKernelArg'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:363: undefined reference to `clSetKernelArg'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:368: undefined reference to `clSetKernelArg'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:373: undefined reference to `clSetKernelArg'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:378: undefined reference to `clSetKernelArg'
/usr/local/lib/libMagickCore.a(magick_libMagickCore_la-accelerate.o):/opt/ImageMagick-6.6.4-5/magick/accelerate.c:382: more undefined references to `clSetKernelArg' follow
/usr/local/lib/libMagickCore.a(magick_libMagickCore_la-accelerate.o): In function `BindConvolveParameters':
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:386: undefined reference to `clFinish'
/usr/local/lib/libMagickCore.a(magick_libMagickCore_la-tiff.o): In function `WriteTIFFImage':
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2522: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2801: undefined reference to `TIFFScanlineSize'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2950: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2952: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2956: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2943: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2946: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2762: undefined reference to `TIFFGetFieldDefaulted'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2764: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2765: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2798: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2782: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2634: undefined reference to `TIFFSetField'
Is this right way to add static libs or problem is somewhere else? Do I have to add manually all libs for missing references?
I have Qt project where I'm using ImageMagick. My pro file looks like this:
CONFIG += qt
QT += opengl
INCLUDEPATH += /usr/local/include/ImageMagick/
HEADERS += /usr/local/include/ImageMagick/Magick++.h
HEADERS += ...
LIBS += /usr/local/lib/libMagick++.so
LIBS += /usr/local/lib/libMagickWand.so
LIBS += /usr/local/lib/libMagickCore.so
SOURCES += ...
I do qmake and then make. Everything compiles flawlessly. I want to link my application with static Image magick libs so I don't have to distribute them with app. I change pro file to this:
CONFIG += qt
QT += opengl
INCLUDEPATH += /usr/local/include/ImageMagick/
HEADERS += /usr/local/include/ImageMagick/Magick++.h
HEADERS += ...
LIBS += /usr/local/lib/libMagick++.a
LIBS += /usr/local/lib/libMagickWand.a
LIBS += /usr/local/lib/libMagickCore.a
SOURCES += ...
Now I'm getting lots of errors during linking. Here are some of them:
/usr/local/lib/libMagickCore.a(magick_libMagickCore_la-accelerate.o): In function `BindConvolveParameters':
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:337: undefined reference to `clCreateBuffer'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:343: undefined reference to `clCreateBuffer'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:349: undefined reference to `clCreateBuffer'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:359: undefined reference to `clSetKernelArg'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:363: undefined reference to `clSetKernelArg'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:368: undefined reference to `clSetKernelArg'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:373: undefined reference to `clSetKernelArg'
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:378: undefined reference to `clSetKernelArg'
/usr/local/lib/libMagickCore.a(magick_libMagickCore_la-accelerate.o):/opt/ImageMagick-6.6.4-5/magick/accelerate.c:382: more undefined references to `clSetKernelArg' follow
/usr/local/lib/libMagickCore.a(magick_libMagickCore_la-accelerate.o): In function `BindConvolveParameters':
/opt/ImageMagick-6.6.4-5/magick/accelerate.c:386: undefined reference to `clFinish'
/usr/local/lib/libMagickCore.a(magick_libMagickCore_la-tiff.o): In function `WriteTIFFImage':
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2522: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2801: undefined reference to `TIFFScanlineSize'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2950: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2952: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2956: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2943: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2946: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2762: undefined reference to `TIFFGetFieldDefaulted'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2764: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2765: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2798: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2782: undefined reference to `TIFFSetField'
/opt/ImageMagick-6.6.4-5/coders/tiff.c:2634: undefined reference to `TIFFSetField'
Is this right way to add static libs or problem is somewhere else? Do I have to add manually all libs for missing references?