Linux and htod

bachmeier via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 16 12:04:38 PDT 2016


On Thursday, 16 June 2016 at 12:23:09 UTC, fbmac wrote:
> How people use it on Linux, if htod is required to import C 
> libraries and windows only?f

Just to clarify, so as to prevent confusion by someone that 
randomly stumbles across this post, you do not need htod, dstep, 
or any other tool to call C libraries from D. dstep generates 
bindings to C libraries for you.

You can create the bindings yourself in your D source files, and 
if you only want to call a couple of functions from a particular 
C library, that's the most convenient. 
http://dlang.org/spec/interfaceToC.html

The wording of the question implies that one of these tools is 
required to call into C libraries, which is not correct.


More information about the Digitalmars-d-learn mailing list