Re: Linux and htod

2016-06-16 Thread yawniek via Digitalmars-d-learn

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.




Re: Linux and htod

2016-06-16 Thread bachmeier via Digitalmars-d-learn

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.


Re: Linux and htod

2016-06-16 Thread fbmac via Digitalmars-d-learn

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


Re: Linux and htod

2016-06-16 Thread Dicebot via Digitalmars-d-learn

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.


Re: Linux and htod

2016-06-16 Thread ketmar via Digitalmars-d-learn

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.


Linux and htod

2016-06-16 Thread fbmac via Digitalmars-d-learn
How people use it on Linux, if htod is required to import C 
libraries and windows only?f