www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Binding to C

reply "TJB" <broughtj gmail.com> writes:
I'm sure this question has been asked a thousand times. I've even 
asked similar questions in the past (I've been away for quite a 
while). But all of the tutorials that I have found assume quite a 
lot and leave a lot to be inferred. Is there a simple step by 
step tutorial demonstrating how to call C code from D? With the 
separate file contents and names and compilation instructions?

Thanks,
TJB
May 11 2015
next sibling parent "Vadim Lopatin" <coolreader.org gmail.com> writes:
On Tuesday, 12 May 2015 at 03:20:34 UTC, TJB wrote:
 I'm sure this question has been asked a thousand times. I've 
 even asked similar questions in the past (I've been away for 
 quite a while). But all of the tutorials that I have found 
 assume quite a lot and leave a lot to be inferred. Is there a 
 simple step by step tutorial demonstrating how to call C code 
 from D? With the separate file contents and names and 
 compilation instructions?

 Thanks,
 TJB
Start with http://wiki.dlang.org/Bind_D_to_C http://dlang.org/interfaceToC.html http://dlang.org/htod.html http://wiki.dlang.org/Converting_C_.h_Files_to_D_Modules Best regards, Vadim
May 12 2015
prev sibling parent "Cassio Butrico" <cassio_butrico ig.com.br> writes:
On Tuesday, 12 May 2015 at 03:20:34 UTC, TJB wrote:
 I'm sure this question has been asked a thousand times. I've 
 even asked similar questions in the past (I've been away for 
 quite a while). But all of the tutorials that I have found 
 assume quite a lot and leave a lot to be inferred. Is there a 
 simple step by step tutorial demonstrating how to call C code 
 from D? With the separate file contents and names and 
 compilation instructions?

 Thanks,
 TJB
Hello if you work with Windows and has the vs2012 a look at this post https://github.com/cassio2014/DIC/tree/master/dic.v2/exemplos/dll%20in%20vs2012%20Cpp%20%20and%20read%20in%20D
May 12 2015