dpp icon indicating copy to clipboard operation
dpp copied to clipboard

Directly include C headers in D source code

Results 90 dpp issues
Sort by recently updated
recently updated
newest added

It is caused by the combination of system include paths and the use of `#include_next` directive in the system headers. In the [example I shown in the issue](https://github.com/atilaneves/dpp/issues/307#issuecomment-1180561484), the dpp...

encountered this error: ~/.dub/packages/dpp-0.4.10/dpp/source/dpp/translation/docs.d(9,45): Error: no property `raw_comment` for type `const(clang.Cursor)` ~/.dub/packages/dpp-0.4.10/dpp/source/dpp/translation/function_.d(134,47): Error: no property `raw_comment` for type `const(clang.Cursor)`

t.h: ```c #include uint32_t test; ``` t.dpp: ```c #include "t.h" void main() { } ``` ```> d++ t.dpp``` output: ``` Error: Error parsing '/tmp/libclangYrt380': ./t.h:3:1: error: unknown type name 'uint32_t'...

can't reproduce

``` # just one line file $ cat ./cuda_runtime_api.dpp #include $ ~/.dub/packages/dpp-0.4.4/dpp/bin/d++ --preprocess-only --hard-fail --include-path=/usr/include --keep-d-files --compiler=ldmd2 ./cuda_runtime_api.dpp $ echo $? 0 $ ~/.dub/packages/dpp-0.4.10/dpp/bin/d++ --preprocess-only --hard-fail --include-path=/usr/include --keep-d-files --compiler=ldmd2 ./cuda_runtime_api.dpp...

Got this error: /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/c++0x_warning.h:32:2: error: This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options....

question

``` struct B { union { int a; char c; }; }; ``` Produces: ``` extern (C) { struct B { static union _Anonymous_0 { int a; char c; }...

wontfix
cosmetic

``` #include "windows.h" struct S { LPCWSTR p; }; ``` Produces ``` extern (C) { struct S { const(ushort)* p; } } ``` Can we have a wchar ?

clang say they mostly match the msvc C++ ABI on windows (https://clang.llvm.org/docs/MSVCCompatibility.html) so it should be possible to get everything working nicely just like on linux. - [x] get dub...

When I use **ldc2** to build a C library, I get these kinds of errors if my d file uses `std.stdio` **dmd** works fine without any issues! ```ps1 > d++...

bug
help wanted
workaround

Hello, I am trying to call the [fftw3](http://www.fftw.org/) library using dpp however there is an issue with type translation in particular with function definitions. Within the C library mentioned, consider...

bug
help wanted
good first issue