I'm having a hard time installing the ImageMagick software for Ubuntu 12.10.

So, I want the C and C++ API, not much more. Now when I go to imagemagick.org, they have a binary package for unix, namely an rpm. When I download and launch it, RPM complains that firstly I should be using alien, and secondly there are like 10000 missing dependencies. If I use alien to create a deb file, and the install it via the software center, the package does indeed install, but only the command line interface - no includes, anything. Same with apt-get imagemagick. (BTW - wtf, they don't have support for ubuntu?)

I tried compiling from source (which I shoudn't be doing anyway - I'm not expecting much customization am I?), and then the includes are present, but the programs won't compile complaining about "undefined reference" and then a list of everything that isn't pure C (and I'm using the command imagemagick.org told me to use, namely cc -o wand pkg-config --cflags --libs MagickWand wand.c) so clearly I'm doing something wrong.

Any help would be much appreciated.

  • Have you checked those API's are not available in the default repositories? Packages like libmagick++-dev and imagemagick should give you what you need.
    – Salem
    Jun 16 '13 at 22:41
  • @Salem I've installed magickwand-dev and imagemagick and now I have linker errors, just like after compiling from source: thumb.c:(.text+0x40): undefined reference to `MagickWandGenesis` thumb.c:(.text+0x45): undefined reference to `NewMagickWand etc etc...
    – user167747
    Jun 16 '13 at 23:04
  • Have you checked this (Usage)?
    – Salem
    Jun 16 '13 at 23:21
  • Yes, it works well for C++ and Magick++, thanks. But MagickWand for C is still giving me errors, and I do what they say here: imagemagick.org/script/magick-wand.php, I'm using this very command to compile.
    – user167747
    Jun 16 '13 at 23:29

I had the same error as you. You'll have to compile with this command:

cc -o wand wand.c `pkg-config --cflags --libs MagickWand`

instead of:

cc -o wand `pkg-config --cflags --libs MagickWand` wand.c

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.