Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

C Header Translator Tool For Delphi Lets You Parse C Header Files Using The Clang Compiler

Since Chet uses an actual compiler, you will need to have a (minimal) C develop environment installed, as well as LLVM with Clang. Clang needs to be able to find the system headers for the development environment. These will usually be available if you have some version of Visual Studio with Visual C++ installed. The free (community) edition of Visual Studio suffices.

As said in the readme on Github, unlike some other header translators, Chet uses the Clang compiler to parse header files, resulting in more accurate translations that require fewer manual adjustments.

Please check out the awesome features Chet lists:

Although Chet has amazing features, there are some limitations that the user has to pay attention on:

You can run Chet first to check for any errors related to missing dependencies. If you get any dependency errors when running the translator, then you can download the dependencies here:

You can use the pre-compiled 64-bit Windows Chet application in the Bin directory.

If you want to compile Chet yourself, then you also need libclang for Delphi and make sure the Delphi IDE can find it (the Chet project will find it automatically if the Neslib.Clang directory is at the same level as the Chet directory).

Chet is licensed under the Simplified BSD License.

From the Github article we understand that Chet is pretty straightforward. In many cases, you only need to provide a directory with header files, the name of the output .pas file and select “Run Header Translator (F9)”.

For more control over the conversion process, you can specify various options, described below. The screenshot from GitHub for the project is below:

This is for sure the best header files parser, so if you want to check it, go to the link below and download it:

https://github.com/neslib/Chet

Exit mobile version