D's dll and classes

Paul Backus snarwin at gmail.com
Sun Sep 19 16:56:34 UTC 2021


On Sunday, 19 September 2021 at 12:00:22 UTC, Hipreme wrote:
> Basically: I have a main program which would contain a lot of 
> code. I have a secondary program which I want to call code from 
> the main program, but it will be compiled as a DLL to the main 
> program call a single entry point from that DLL.
>
> [...] I tried writing only .di file for it, but then it would 
> only get undefined symbol. What I expected is:

You may need to use the [`export` attribute][1] to make symbols 
in the DLL visible to the main program.

[1]: https://dlang.org/spec/attribute.html#visibility_attributes


More information about the Digitalmars-d-learn mailing list