September 03, 2018
On Monday, 3 September 2018 at 10:50:17 UTC, Russel Winder wrote:
> Interesting alternative to DStep. I came to D to avoid #include, but… I'll give it a whirl once I can get it compiled on Debian Sid. It seems the libclang-dev package does not install a libclang.so symbolic link, you have to be explicit about which version you want, e.g. libclang- 6.0.so on my Debian Sid installation.

I use dpp to generate d code to import:
- Create a temp.dpp file with #include inside
- Run "d++ --preprocess-only temp.dpp"

Now you have your .d file exactly like in dstep.

Andrea
September 03, 2018
On Mon, 2018-09-03 at 12:45 +0000, Andrea Fontana via Digitalmars-d- learn wrote:
> […]
> 
> I use dpp to generate d code to import:
> - Create a temp.dpp file with #include inside
> - Run "d++ --preprocess-only temp.dpp"
> 
> Now you have your .d file exactly like in dstep.
> 

So where does this leave DStep if DPP is the next generation tool?

Of course I can create a dstep executable, but cannot yet create a d++ executable on Debian Sid. :-(

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



September 06, 2018
On Mon, 2018-09-03 at 11:41 +1200, rikki cattermole via Digitalmars-d-learn
wrote:
[…]
> 
> You won't need to actually fill out any c struct's that you don't need either. Make them opaque as long as they are referenced via pointer and not by value.

True. And indeed Fontconfig can mostly meet the "it's an opaque type based system" but there are a few dark corners – most of which I need!

[…]
> 
> Ugh, you do know that the linker which does all the hard work doesn't know anything about the signature of the C function? That is the part SharedLib replaces. You will of course define it with a proper signature on D's side with a helpful cast :)

Not good enough to be honest, D is a statically typed language and so all usage of functions should be checked against something other than a human guess.

Anyway DStep has given me a Fontconfig D module that works nicely, and I will
check dpp as an alternative as soon as it builds on Debian Sid.

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk



1 2
Next ›   Last »