On Monday, 21 September 2015 at 05:25:01 UTC, 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!
unfortunately no...
as stated at http://dlang.org/cpp_interface.html to support C/C++
source would be practically unimplementable note I say
practically because while theoretically it is possible, the D
community has neither the resources nor the time to implement
such a feature.
If you look around D.announce I seem to remember someone hacked
up LLVM and clang to allow such interface.