link to C function whose name is a D keyword

Carl Sturtivant via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 6 07:41:27 PST 2016


Hello,

Is there a way from D to do this, without writing a C wrapper?

e.g. I want to call a C function named 'try'.

/* C prototype */
int try(int x);

//D that doesn't work:
extern(C) int try(int x);




More information about the Digitalmars-d-learn mailing list