Ghostscript iapi.h breaks certain builds

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
seanburke1979

Ghostscript iapi.h breaks certain builds

Post by seanburke1979 »

Hello everyone. I am running into a problem on a piece of code I am trying to build on specific OS X and linux machines. On machines that do not have ghostscript installed, everything compiles fine. On machine that do, compilation fails with:

Code: Select all

gcc -I. `Magick-config --cflags` -c fft.c -L. -o fft.o
In file included from /usr/local/include/magick/delegate.h:26,
                 from /usr/local/include/magick/MagickCore.h:158,
                 from fft.c:17:
/usr/include/ghostscript/iapi.h:252: error: expected ')' before '__extension__'
/usr/include/ghostscript/iapi.h:289: error: expected ')' before '__extension__'
My code is a pretty simple numerical algorithm and does not explicitly call ghostscript. Has anyone run into this? I am pulling my hair out trying to figure this one out. Also, I should mention that the error is consistent for at least all versions > 6.3.5.

Thanks,

Sean
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Ghostscript iapi.h breaks certain builds

Post by magick »

Add --without-gslib to your configure command line. For the next point release, we have moved the Ghostscript includes to a private file so the Ghostscipt header files are not included when including the ImageMagick API.
seanburke1979

Re: Ghostscript iapi.h breaks certain builds

Post by seanburke1979 »

Thanks! I never would have discover that!

Best,

Sean
Post Reply