DMD + Dynamic Library.
Cassio Butrico via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Mar 10 17:27:05 PST 2017
On Wednesday, 8 March 2017 at 18:21:35 UTC, Damien Gibson wrote:
> On Wednesday, 8 March 2017 at 06:28:47 UTC, Jerry wrote:
>> You have to use "export" for any symbol to be visible from a
>> dll. On Windows by default nothing is exported.
>
> Would "export" and "export extern(D):" not be the same? Im
> confuseled..
You have to use
extern (C) {
import std.stdio;
export{
void dllprint() {
writeln("\nmydll.dll read ok!!!\n");
}
int Myadd(int x, int y) {
return x + y;
}
}
}
More information about the Digitalmars-d-learn
mailing list