-betterC is amazing, make (/keep making) it more sophisticated!

Seb seb at wilzba.ch
Thu Mar 22 16:03:14 UTC 2018


On Thursday, 22 March 2018 at 15:42:54 UTC, Radu wrote:
> On Wednesday, 21 March 2018 at 22:48:36 UTC, Seb wrote:
>> On Wednesday, 21 March 2018 at 22:33:37 UTC, Aedt wrote:
>>> [...]
>>
>> Thanks a lot for these kind words!
>>
>>> [...]
>>
>> I heard that Walter recently ported his DMC++ to D and I heard 
>> that someone was working on this, so chances aren't too bad 
>> that this might happen ;-)
>>
>>> [...]
>>
>> What do you miss / are referring to?
>>
>>> [...]
>>
>> Not sure whether you are aware of these two projects?
>>
>> https://github.com/jacob-carlborg/dstep (converts C headers to 
>> D headers auto-magically)
>>
>> https://github.com/Syniurge/Calypso (LDC fork which allows 
>> direct interfacing with C/C++ code)
>>
>> For my use cases dstep works nicely.
>
> Would be nice to have a facility to generate C headers from a 
> module, ala' `-H` but instead of generating D .di to generate C 
> compilable .h files.
>
> I find it tedious to manually generate those, so for some 
> projects I use some template magic and pragma(msg, ...) to 
> generate a bunch of defines/declarations, but having it build 
> in into the compiler would make it even better!

FYI: There were a few efforts to attempt this, e.g.

https://github.com/dlang/dmd/pull/5082
https://github.com/dlang/tools/pull/39
https://issues.dlang.org/show_bug.cgi?id=9285

In short: it's a bit complicated and no one has managed to get it 
to the finish line so far.
However, with DMD's new DUB package this might be possible to do 
without needing to be added to dlang/dmd and can start to grow as 
a separate project.


More information about the Digitalmars-d mailing list