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

Martok listbox at martoks-place.de
Tue Aug 22 15:59:13 CEST 2017


If your header looks enough like IDL (which is essentially C++ with
annotations), you may also be able to use one of the available IDL compilers.
There are a few dialect issues though, so YMMV. I'd say MPFR has a few defines
too many for my idlproc (https://github.com/martok/idlproc), but may come closer
for others.

As a heads-up: whatever tool you end up using, make sure you do NOT translate
the C enums in mpfr.h as enumerations. It will work, but create unpredictable
codegen on the FPC side. Use plain constants.

--
Martok




More information about the fpc-pascal mailing list