Closed EgorBo closed 5 years ago
Thanks for the first issue logged... and that's a bug! 😱
This should be fixed by commit 34d3686f26b4dfe18abc509eff4b0d743281bfe9 and available shortly in 0.1.2
Yeah, this kind of file like simdjson.h
ìs not really great for CppAst, as it is not really a file supposed to be consumable by an interop layer, as it doesn't really export any functions and it also imports a vast amount of unsupported C++ constructs (by libclang) into the file.
@xoofx Thanks, going to try it anyway for SimdJsonSharp. Currently I generate these two files by hands: C++ to C: https://github.com/EgorBo/SimdJsonSharp/blob/master/src/BindingsForNativeLib/SimdJsonNative/bindings.cpp C# DllImports: https://github.com/EgorBo/SimdJsonSharp/blob/master/src/BindingsForNativeLib/SimdJsonSharp.Bindings/Bindings.cs
Oh right, yes, you should be able to generate these easily. Let me know if it doesn't work!
I am trying to parse this file: https://github.com/lemire/simdjson/blob/master/singleheader/simdjson.h (simdjson single header). using the following code:
but getting an NRE. The lib looks great! CppSharp is not that easy to use