can't link sample MagickCore program

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
jcupitt
Posts: 26
Joined: 2011-04-26T05:14:01-07:00
Authentication code: 8675308

can't link sample MagickCore program

Post 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.
Post Reply