Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-03

Problem with h2pas

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Felipe Monteiro de Carvalho

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)

thanks,

Felipe Monteiro de Carvalho
Michael Van Canneyt
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 13 lines
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.

Felipe Monteiro de Carvalho
to Michael Van Canneyt
Michael Van Canneyt wrote
The problem is the 'MagickExport'. Remove that and it'll work fine. This is a macro, and h2pas does not support macros.

Ok, I removed it and h2pas doesn't complain now.

One more problem occured, however. On this declaration:

extern MagickExport MagickBooleanType
AnimateImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *), AnimateImages(const ImageInfo *,Image *);

It only creates the first function. It ignores the second. Apparently h2pas doesn't support this kind of declaration.

thanks,

Felipe Monteiro de Carvalho