neslib / Chet

C Header Translator for Delphi
BSD 2-Clause "Simplified" License
207 stars 44 forks source link

[Question] Why no C++? #24

Closed anonimo82 closed 1 year ago

anonimo82 commented 1 year ago

As in subject, why is C++ not supported?

neslib commented 1 year ago

This tool is created to integrate with C libraries (DLL's and static libraries). Delphi cannot integrate with C++ libraries, so there is no point in creating a C++ header translator. Furthermore, there are a lot of C++ features that cannot be translated to Delphi.

However, if your goal is to translate some "simple" C++ code to Delphi, then you can use my Neslib.Clang library to give it a go yourself. This library uses the Clang backend to parse C(++) code into an Abstract Syntax Tree, that you can then use to generate Delphi code. You can read more about this in my libclang for Delphi blog post.