Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically create Delphi/Freepascal interface unit from C header file

Is it possible to automatically generate interface units from C header files? In particular, I want to wrap the HDF5 library, and it would be great if I could avoid writing the interface unit manually.

like image 595
andreas-h Avatar asked Oct 17 '12 16:10

andreas-h


1 Answers

The free pascal includes the H2PAS tool.

h2pas attempts to convert a C header file to a pascal unit. it can handle most C constructs that one finds in a C header file, and attempts to translate them to their pascal counterparts.

like image 82
RRUZ Avatar answered Sep 19 '22 16:09

RRUZ