Compile and link C/C++ libs automatically
Jacob Carlborg
doob at me.com
Fri Dec 4 15:23:45 UTC 2020
On 2020-12-03 10:10, Robert M. Münch wrote:
> Go make it even simpler and IMO that's the way to go:
>
> // <myinclude.>
> Import "C"
>
> And now use all your C functions and structs, etc.
>
> That's the way to go. No extra tool, no pre-step conversion, no fiddling
> around with separate files.
>
> Just simple, straight import and you are done.
This works in Zig as well. It's even simpler in Zig since you don't need
a C compiler or linker. That's all built-in to the Zig compiler.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list