A C header to Delphi Pascal translator using libclang for accurate conversion of C libraries.
Chet is a specialized tool that translates C header files (.h) into Delphi Pascal units (.pas), enabling Delphi developers to easily interface with C libraries. It leverages the Clang compiler via libclang for Delphi to parse C code, resulting in more accurate translations with fewer manual fixes compared to other translators. The tool automates the conversion of data types, functions, and conditional compilation directives, bridging the C and Delphi ecosystems.
Delphi developers who need to interface with C libraries, such as those working on multi-platform applications (Windows, macOS, Linux, iOS, Android) or integrating third-party C-based APIs and SDKs into Delphi projects.
Developers choose Chet over alternatives because it uses the actual Clang compiler for parsing, which improves accuracy and handles complex C constructs like conditional compilation. It offers extensive customization options, bulk translation of entire directories, and multi-platform support from a single configuration, reducing manual effort and errors.
C Header Translator for Delphi
Uses the Clang compiler to parse C headers, handling conditional compilation and complex constructs with fewer manual fixes, as highlighted in the README for improved translation quality.
Generates Delphi code for Windows, macOS, Linux, iOS, and Android from a single configuration, streamlining cross-development efforts without separate setups.
Processes entire directories of header files into one .pas file, automatically managing dependencies between headers to reduce integration issues.
Offers configurable settings for calling conventions, comment handling, enum conversion, and reserved word adjustments, allowing tailored output for specific project needs.
Does not support C++ header files, restricting its use for modern libraries that often rely on C++ features, as admitted in the README limitations.
Relies on the host system's Clang configuration, so parsing can be skewed by platform-specific defines (e.g., _WIN32 on Windows), potentially missing code for other targets and requiring manual intervention.
Requires installation of external dependencies like LLVM/Clang and a C development environment such as Visual Studio, adding setup overhead before translation can begin.
A collection of useful .gitignore templates
Dependency Manager for Delphi and Lazarus
C To Delphi converter
Generate Object Pascal (Delphi, FPC), Oxygene, C++ and C# code to access the WMI
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.