Re: Easy way for FFI

2024-09-22 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
On 23/09/2024 10:13 AM, Maximilian Naderer wrote: I want to create a .h file from my D modules so you’re saying this should be also possible ? There is support in the compiler, but its not really mature. https://dlang.org/dmd-windows.html#switch-HC[

Re: Easy way for FFI

2024-09-22 Thread Maximilian Naderer via Digitalmars-d-learn
Hello Richard, Thank you for the info. I thought this goes the other way around. Using a header file and converting it to a .di file. I want to create a .h file from my D modules so you’re saying this should be also possible ?

Re: Easy way for FFI

2024-09-22 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
There are a number of solutions for C bindings creation. Try ImportC its built into the compiler. You can use the .di generator to emit a D file for further use and manual cleanup. https://dlang.org/spec/importc.html It does depend upon the system toolchain, so you'll want MSVC installed if