extern(C) in druntime

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Mon Nov 10 07:39:43 PST 2014


???

$ cat a.d
module a;

pragma(mangle, "foo")
extern(D) void foo()
{
     import std.stdio;
     writeln("in extern foo");
}

$ cat b.d
module b;

pragma(mangle, "foo")
extern void foo();

void main()
{
     foo();
}

$ ./a
in extern foo


More information about the Digitalmars-d mailing list