Would appreciate some help porting Q3VM to D (mainly C macros and type conversions)

Lance Bachmeier no at spam.net
Tue Oct 15 16:05:48 UTC 2024


On Tuesday, 15 October 2024 at 13:30:03 UTC, Mark Bauermeister 
wrote:
> On Tuesday, 15 October 2024 at 12:27:42 UTC, barbosso wrote:
>> Are you heard of https://github.com/dkorpel/ctod ?
>
> I actually used CTOD for part of the translation but it 
> wouldn't translate the macros correctly. It turned them into 
> weird string mixins.

It's not as well known, but ImportC also converts C code to D: 
https://dlang.org/spec/importc.html#ctod It needs the -inline 
switch to output function bodies. The last time I used it, there 
were problems with generation of duplicate items, but it was able 
to handle most anything I threw at it. Would be worth a try.


More information about the Digitalmars-d-learn mailing list