Re: Creating D bindings for a C library

2015-11-25 Thread Andy Smith via Digitalmars-d-learn
On Wednesday, 25 November 2015 at 21:19:51 UTC, Andy Smith wrote: On Wednesday, 25 November 2015 at 19:40:28 UTC, Joseph Rushton Wakeling wrote: On Wednesday, 25 November 2015 at 17:45:48 UTC, ponce wrote: If doing it by hand, some tips here: http://p0nce.github.io/d-idioms/#Porting-from-C-gotc

Re: Creating D bindings for a C library

2015-11-25 Thread Andy Smith via Digitalmars-d-learn
On Wednesday, 25 November 2015 at 19:40:28 UTC, Joseph Rushton Wakeling wrote: On Wednesday, 25 November 2015 at 17:45:48 UTC, ponce wrote: If doing it by hand, some tips here: http://p0nce.github.io/d-idioms/#Porting-from-C-gotchas Cool, thanks. The stuff about using c_long and c_ulong is p

Re: Creating D bindings for a C library

2015-11-25 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
On Wednesday, 25 November 2015 at 17:45:48 UTC, ponce wrote: If doing it by hand, some tips here: http://p0nce.github.io/d-idioms/#Porting-from-C-gotchas Cool, thanks. The stuff about using c_long and c_ulong is particularly useful/relevant to my use-case, so it's good to be reminded of that

Re: Creating D bindings for a C library

2015-11-25 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
On Tuesday, 24 November 2015 at 23:49:26 UTC, cym13 wrote: There are some binding generator the most two famous being htod and dstep: http://wiki.dlang.org/List_of_Bindings#Binding_generators Is htod maintained any more? I had the impression it had kind of fallen by the wayside. I'll give

Re: Creating D bindings for a C library

2015-11-25 Thread ponce via Digitalmars-d-learn
On Tuesday, 24 November 2015 at 23:22:24 UTC, Joseph Rushton Wakeling wrote: On Tuesday, 24 November 2015 at 23:14:14 UTC, Joseph Rushton Wakeling wrote: I'm considering creating some D bindings for a C library. I should probably clarify that I know what to do assuming I have to write all the

Re: Creating D bindings for a C library

2015-11-24 Thread cym13 via Digitalmars-d-learn
On Tuesday, 24 November 2015 at 23:22:24 UTC, Joseph Rushton Wakeling wrote: On Tuesday, 24 November 2015 at 23:14:14 UTC, Joseph Rushton Wakeling wrote: I'm considering creating some D bindings for a C library. I should probably clarify that I know what to do assuming I have to write all the

Re: Creating D bindings for a C library

2015-11-24 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
On Tuesday, 24 November 2015 at 23:14:14 UTC, Joseph Rushton Wakeling wrote: I'm considering creating some D bindings for a C library. I should probably clarify that I know what to do assuming I have to write all the bindings manually. However, as the library has quite a lot of header files,

Creating D bindings for a C library

2015-11-24 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
Hello all, I'm considering creating some D bindings for a C library. Before I start, I was wondering if anyone could advise me on the current state-of-the-art in automatically converting C headers to .d or .di files; it's a long time since I've looked at anything to do with this and the inte