Thread overview
Linux and htod
Jun 16, 2016
fbmac
Jun 16, 2016
ketmar
Jun 16, 2016
Dicebot
Jun 16, 2016
fbmac
Jun 16, 2016
bachmeier
Jun 16, 2016
yawniek
June 16, 2016
How people use it on Linux, if htod is required to import C libraries and windows only?f
June 16, 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

we don't.
June 16, 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

People don't use htod. https://github.com/jacob-carlborg/dstep is best what one can be for plain binding generation.
June 16, 2016
On Thursday, 16 June 2016 at 12:39:00 UTC, Dicebot wrote:
> 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
>
> People don't use htod. https://github.com/jacob-carlborg/dstep is best what one can be for plain binding generation.

Thanks, I'll check it out. This was always a barrier for me to take the effort of learning D
June 16, 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.
June 16, 2016
On Thursday, 16 June 2016 at 19:04:38 UTC, bachmeier wrote:
> 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.

https://wiki.dlang.org/D_binding_for_C is also helpful
they should be put together.