Oh My Gentool [v0.0.1] (Yet another binding generator)

Atila Neves atila.neves at gmail.com
Sat Oct 27 16:55:23 UTC 2018


On Tuesday, 23 October 2018 at 20:32:29 UTC, Andrea Fontana wrote:
> On Tuesday, 23 October 2018 at 20:03:42 UTC, Atila Neves wrote:
>> We do - it's just very far from being complete. dpp can do 
>> some simple C++ and would have been able to do 
>> C-with-classes-style C++ ages ago. My focus is on templates 
>> though, since for me I can't see any useful C++ libraries that 
>> I'd actually want to call from D that don't use templates. And 
>> sometimes it's as silly as wanting to bind to an existing 
>> not-that-complicated library that happens to have a 
>> std::vector in its structs. For that, you need to be able to 
>> translate the standard library.
>
> Interesting. I'm using it for many different c libraries but I 
> didn't think it worked for c++  already!
>
> The only problem I found with DPP is that simple consts 
> declared with #define are not translated if not explicitly 
> used. I think i can understand the reason (macro evaluation, I 
> guess) but it would be useful to have a way to export them if 
> they are simple consts...

The whole idea of dpp is to be able to use headers as they are 
used in C and C++. Macros there don't exist unless they're 
expanded, so it's the same thing with dpp.

Maybe it's good idea to add a runtime flag to translate 
non-function-like macros as enums... hmm.


More information about the Digitalmars-d-announce mailing list