[fpc-pascal] Problem with h2pas

Michael Van Canneyt michael at freepascal.org
Sat Mar 18 21:40:24 CET 2006



On Sat, 18 Mar 2006, Felipe Monteiro de Carvalho wrote:

> Hello,
> 
> I am trying to use h2pas to convert the rest of ImageMagick headers.
> On a file that contains only 3 lines of code:
> 
> extern MagickExport MagickBooleanType
>   AnimateImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *),
>   AnimateImages(const ImageInfo *,Image *);
> 
> h2pas gives me a generic "syntax error" error pointing to the 2nd line
> of code =(
> 
> any ideas? (or other conversion tools)

The problem is the 'MagickExport'. Remove that and it'll work fine. 
This is a macro, and h2pas does not support macros.

One thing to do is to run each .h file through gcc -E first.

Michael.



More information about the fpc-pascal mailing list