MagickCore.h not found

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
fcc

MagickCore.h not found

Post by fcc »

I installed ImageMagick on my server (Redhat Linux 4.0) using "up2date ImageMagick". It installed OK; there's a man page as well. However, I tried compiling the MagickCore example (core.c) using their example compiler call, and came up with the following errors:
Magick-config: command not found
magick/MagickCore.h: No such file or directory
Any ideas why it couldn't find these? Do I need to install a MagickCore package as well?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: MagickCore.h not found

Post by magick »

Looks like you need to install the ImageMagick-devel package which should include Magick-config and the header files. If you have an older version of ImageMagick you may need to reference magick/api.h instead of magick/MagickCore.h. Also instead of MagickCoreGenesis() and MagickCoreTerminus() use InitializeMagick() and DestroyMagick() respectively.
fcc

Re: MagickCore.h not found

Post by fcc »

Thanks for your help. That worked! It looks like Redhat (via up2date) is accessing an older version of ImageMagick. Is there any way to install the latest version on Redhat linux with up2date, or to get documentation for writing in MagickCore in the Redhat older version?

Here's what I still get from the Redhat loaded (up2date) ImageMagick and ImageMagick-devel when I try to compile core.c, after I made the substitutions you recommended:

core.c: In function `main':
core.c:24: warning: implicit declaration of function `AcquireExceptionInfo'
/tmp/ccdWg9Wd.o(.text+0x27): In function `main':
/images/core.c:24: undefined reference to `AcquireExceptionInfo'
collect2: ld returned 1 exit status
Post Reply