Page 1 of 1

can't link sample MagickCore program

Posted: 2015-10-30T07:19:55-07:00
by jcupitt
Hi, the intro to magickcore page has a simple example program:

http://www.imagemagick.org/script/magick-core.php

It suggests you compile with

Code: Select all

cc -o core core.c `pkg-config --cflags --libs MagickCore`
But with recent (6.9 and later? I'm trying 6.9.2-4) imagemagick, this fails with a lot of link errors along the lines of:

Code: Select all

/home/john/vips/lib/libMagickCore-6.Q16.so: undefined reference to `PixelSetQuantumColor'
/home/john/vips/lib/libMagickCore-6.Q16.so: undefined reference to `DrawSetClipRule'
.... etc.
What's the current recommended way to compile MagickCore programs?

This is on Ubuntu 15.10.