www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Linux and htod

reply fbmac <machado2 gmail.com> writes:
How people use it on Linux, if htod is required to import C 
libraries and windows only?f
Jun 16 2016
next sibling parent ketmar <ketmar ketmar.no-ip.org> writes:
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.
Jun 16 2016
prev sibling next sibling parent reply Dicebot <public dicebot.lv> writes:
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.
Jun 16 2016
parent fbmac <machado2 gmail.com> writes:
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
Jun 16 2016
prev sibling parent reply bachmeier <no spam.com> writes:
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.
Jun 16 2016
parent yawniek <dlang srtnwz.com> writes:
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.
Jun 16 2016