DStep rocks [was Example of using C API from D?]

Russel Winder russel at winder.org.uk
Mon Sep 3 10:50:17 UTC 2018


On Sun, 2018-09-02 at 21:54 +0000, Laeeth Isharc via Digitalmars-d-
learn wrote:
> On Sunday, 2 September 2018 at 17:49:45 UTC, Russel Winder wrote:
> > 
[…]
> > Now to work out how to make the project auto generate this D 
> > module so as to avoid having it in the repository, and 
> > potentially inconsistent with the platform in use.

Turns out this is easy with Meson and SCons. Dub is giving some issues.
:-(

> You could also look at dpp. That's worked for most things I tried 
> and was written in part to avoid the problem of macros changing 
> behaviour at build time.
> 
> Example here:
> 
> 
https://run.dlang.io/?compiler=dmd&source=%23include%20<stdio.h>%0Avoid%20main()%20%7B%0A%20%20%20%20printf("Hello%20dpp.");%0A%7D
> 
> https://github.com/atilaneves/dpp

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.

-- 
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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20180903/3f2784a4/attachment.sig>


More information about the Digitalmars-d-learn mailing list