Problem with h2pas

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with h2pas

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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Problem with h2pas

Michael Van Canneyt


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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Problem with h2pas

Felipe Monteiro de Carvalho
On 3/18/06, Michael Van Canneyt <[hidden email]> 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal