[fpc-pascal] H2pas tool vs others, C header translation

Michael Van Canneyt michael at freepascal.org
Mon Aug 21 08:26:33 CEST 2017



On Sun, 20 Aug 2017, noreply at z505.com wrote:

> Forgive me, I have forgotten, this may have been discussed before..
>
> Is h2pas the latest tool to convert C headers to pas files?

For FPC, yes.

>
> Is there a competing tool that does more, or is updated more?
>
> I remember Bob Swart AFAIR had a popular tool for delphi.
>
> And some people use multiple tools if one tool is giving them issues.
>
> Is h2pas for example the one that is used for Mysql header translations 
> and other major C headers?

Yes.

>
> I am looking to convert the GNU MPFR library header files, or hire 
> someone on a bounty to do it if header translation is not so easy with 
> h2pas and requires lots of hand work, and close checking.

I do all header translations with h2pas. Most of the time, I run the code
first through gcc -E, which will take care of all macro magic. Usually h2pas
has little trouble with the result.

Michael.



More information about the fpc-pascal mailing list