Closed MoonlightSentinel closed 2 years ago
This project should probably be delayed until dtoh
is finished / stable.
This was already implemented, wasn't it?
Hi, I recently took an interesting in such a feature, which is most useful when porting (bit by bit) existing C codebases to D.
This was already implemented, wasn't it?
The feature that was implemented, as @MoonlightSentinel said, was the generation for C++ header files.
This was also mentioned on #4.
As of 2.105.0, I don't think the generation of C (no C++) header files is there.
I'd ask for any information regarding developments on this matter and, if possible, to reopen this issue.
Replacement of the previous issue which proposed C/C++ header generation in general.
Description
DMD's integrated header generator (available via
-HC
) emits a C++ header that contains bindings for allextern (C[++])
symbols in the compiled code. The generated header uses C++ features and hence won't be usable for C code that calls into D code.What are rough milestones of this project?
The goal of this project is a C compatibility mode for
dtoh
that can be enabled from the command line. The header generator should then be restricted to C features and try to use suitable replacements for C++ constructs.How does this project help the D community?
Easy access to D code from C.