can D compiler support C/C++ source code?
Jacob Carlborg via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 20 23:06:04 PDT 2015
On 2015-09-21 07:24, donglei wrote:
> While D is binary compatible with C code, it cannot compile C code nor C
> header files.
> In order to use C/C++ binary libs, I have to convert C or C++ header
> files to D module.
> It make very difficult to use C binary libs.
> Can D compiler support C/C++ source code in future?
> If can, it will become easy and convenient to use C/C++ libs in Dlang.
> Hope to achieve it as soon as possible!
For C, there's a tool called DStep [1] that can automatically generate
bindings. It's not 100% perfect but will get you a long way.
[1] https://github.com/jacob-carlborg/dstep
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list