D-dll support: testers needed round 2
Rainer Schuetze
r.sagitario at gmx.de
Sat Mar 31 08:44:59 UTC 2018
On 21/03/2018 14:08, Martin Nowak wrote:
> On Friday, 9 February 2018 at 20:34:33 UTC, Benjamin Thaut wrote:
>> My work on dll support for D continues. There is another iteration I
>> need help testing with.
>>
>> Getting started tutorial:
>> http://stuff.benjamin-thaut.de/D/getting_started.html
>> The DIP can again found be here:
>> https://github.com/Ingrater/DIPs/blob/ReviveDIP45/DIPs/DIP45.md
>> The DIP is not up to date. The tutorial is more recent. If the DIP and
>> the tutorial contradict each other trust the tutorial. Its still
>> useful to read the dip for context, especially as how to use "export"
>> in code.
>
> Glad to see some progress.
> Given that the goal of DIP45 was seemless DLL support given just export
> annotations, the need for explicit -import module lists indeed requires
> an explanation. Looks like a classical dllexport/-import scheme now.
AFAICT -import was an idea proposed by Walter because he didn't like
-useshared that is still in the DIP.
A previous version of the DLL support implemented -useshared and worked
quite well in my tests. For simplicity I prefer -useshared although it
might incur a minor performance penalty when adding an indirection to a
library that is actually linked statically (not sure about the linker
optimization you mentioned in the other response).
More information about the Digitalmars-d
mailing list