www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - htod question

reply Dibyendu Majumdar <d.majumdar gmail.com> writes:
I tried using htod but got errors as it could not handle the std 
C header files (Visual C++). How do people work around this?

Thanks and Regards
Dibyendu
Jan 21 2016
next sibling parent reply W.J. <invalid email.address> writes:
On Friday, 22 January 2016 at 00:31:01 UTC, Dibyendu Majumdar 
wrote:
 I tried using htod but got errors as it could not handle the 
 std C header files (Visual C++).
And probably never will. D doesn't have a preprocessor so it's kind of hard to automate the process.
 How do people work around this?

 Thanks and Regards
 Dibyendu
They don't. Counter question: What's so bad about the D std library ?
Jan 21 2016
parent reply Dibyendu Majumdar <d.majumdar gmail.com> writes:
On Friday, 22 January 2016 at 00:52:59 UTC, W.J. wrote:
 Counter question: What's so bad about the D std library ?
I am trying to create bindings for existing C library so I was trying to use htod for that.
Jan 21 2016
parent reply Dibyendu Majumdar <d.majumdar gmail.com> writes:
On Friday, 22 January 2016 at 01:03:09 UTC, Dibyendu Majumdar 
wrote:
 On Friday, 22 January 2016 at 00:52:59 UTC, W.J. wrote:
 Counter question: What's so bad about the D std library ?
I am trying to create bindings for existing C library so I was trying to use htod for that.
The library includes various C header files ... causing htod to fail
Jan 21 2016
next sibling parent W.J. <invalid email.address> writes:
On Friday, 22 January 2016 at 01:04:50 UTC, Dibyendu Majumdar 
wrote:
 On Friday, 22 January 2016 at 01:03:09 UTC, Dibyendu Majumdar 
 wrote:
 On Friday, 22 January 2016 at 00:52:59 UTC, W.J. wrote:
 Counter question: What's so bad about the D std library ?
I am trying to create bindings for existing C library so I was trying to use htod for that.
The library includes various C header files ... causing htod to fail
I see. I didn't quite understand your question correctly. I thought you were trying to port over the std c library. Maybe you can give an example ?
Jan 21 2016
prev sibling parent Sebastiaan Koppe <mail skoppe.eu> writes:
On Friday, 22 January 2016 at 01:04:50 UTC, Dibyendu Majumdar 
wrote:
 On Friday, 22 January 2016 at 01:03:09 UTC, Dibyendu Majumdar 
 wrote:
 On Friday, 22 January 2016 at 00:52:59 UTC, W.J. wrote:
 Counter question: What's so bad about the D std library ?
I am trying to create bindings for existing C library so I was trying to use htod for that.
The library includes various C header files ... causing htod to fail
Yeah, htod often requires preparing the files your trying to convert. Often removing macro's and the like. Its a manual process, and it can get dirty.
Jan 23 2016
prev sibling parent Jacob Carlborg <doob me.com> writes:
On 2016-01-22 01:31, Dibyendu Majumdar wrote:
 I tried using htod but got errors as it could not handle the std C
 header files (Visual C++). How do people work around this?
You could try DStep [1]. Although I'm not entirely sure if it works on Windows. It uses libclang, so if Clang can handle the header file it should work in DStep as well. [1] https://github.com/jacob-carlborg/dstep -- /Jacob Carlborg
Jan 22 2016