Lazarus

Programming => General => Topic started by: Akira1364 on May 31, 2019, 04:56:34 pm

Title: Useful alternative to H2Pas I came across
Post by: Akira1364 on May 31, 2019, 04:56:34 pm
This application I found on github, called Chet:

https://github.com/neslib/Chet (https://github.com/neslib/Chet)

uses libClang to do the header parsing (meaning it can actually fully parse all of C), and based on some tests I've done pretty much "just works"  and produces Pascal output that requires almost no modifications for basically anything you throw at it.

Note there's some caveats, however: as written the library / application are designed for Delphi, and Windows-only. That said, I've succesfully managed to get it to compile with FPC, and am currently working on modifying it to work on Linux and Mac also (which is mostly a matter of altering how it loads libClang, e.t.c.)

I'll likely make a Github fork repo at some point and post the link here if anyone is interested, as I think it'd be great to have a bindings generator for FPC capable of handling complex libraries a bit more easily.
Title: Re: Useful alternative to H2Pas I came across
Post by: 440bx on May 31, 2019, 06:10:01 pm
I'll likely make a Github fork repo at some point and post the link here if anyone is interested
To just say I'm interested in that would be quite an understatement. ;)

I'm looking forward to having something like that using FPC.