Recent

Author Topic: Useful alternative to H2Pas I came across  (Read 897 times)

Akira1364

  • Hero Member
  • *****
  • Posts: 561
Useful alternative to H2Pas I came across
« on: May 31, 2019, 04:56:34 pm »
This application I found on github, called 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.

440bx

  • Hero Member
  • *****
  • Posts: 3946
Re: Useful alternative to H2Pas I came across
« Reply #1 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.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018