Thread overview
LDC Dll support
Nov 22, 2014
Benjamin Thaut
Nov 24, 2014
Kai Nacke
Nov 25, 2014
Benjamin Thaut
Dec 03, 2014
Kagamin
November 22, 2014
How far is the dll support of LDC?
Does the -shared option of the compiler actually work for the x86 mingw or x64 msvc versions of ldc?
If it does work, what does -shared do? Does it always export all symbols or only those annoted with the "export" attribute?

Kind Regards
Benjamin Thaut
November 24, 2014
On Saturday, 22 November 2014 at 11:03:03 UTC, Benjamin Thaut wrote:
> How far is the dll support of LDC?
> Does the -shared option of the compiler actually work for the x86 mingw or x64 msvc versions of ldc?
> If it does work, what does -shared do? Does it always export all symbols or only those annoted with the "export" attribute?
>
> Kind Regards
> Benjamin Thaut

Hi Benjamin,

I never tried to build a dll with x86 mingw compiler - I have to check this. The x64 msvc compiler is currently not able to build a dll - some support code is still missing.

Regards,
Kai
November 25, 2014
Am 24.11.2014 21:19, schrieb Kai Nacke:
> On Saturday, 22 November 2014 at 11:03:03 UTC, Benjamin Thaut wrote:
>> How far is the dll support of LDC?
>> Does the -shared option of the compiler actually work for the x86
>> mingw or x64 msvc versions of ldc?
>> If it does work, what does -shared do? Does it always export all
>> symbols or only those annoted with the "export" attribute?
>>
>> Kind Regards
>> Benjamin Thaut
>
> Hi Benjamin,
>
> I never tried to build a dll with x86 mingw compiler - I have to check
> this. The x64 msvc compiler is currently not able to build a dll - some
> support code is still missing.
>
> Regards,
> Kai

That is unfortunate. Then I will have no choice to implemented propper DLL support in the reference compiler ;-)

In case you ever try to get it working within ldc I strongly recommend that you ignore the "export" protection level, as it is horribly broken in may ways (see http://wiki.dlang.org/DIP45). Or wait until I'm done implementing DIP45 and its actually accepted into the master branch of dmd.

Kind Regards
Benjamin Thaut
December 03, 2014
On Tuesday, 25 November 2014 at 20:26:45 UTC, Benjamin Thaut wrote:
> In case you ever try to get it working within ldc I strongly recommend that you ignore the "export" protection level, as it is horribly broken in may ways (see http://wiki.dlang.org/DIP45).

What you refer to is probably only an organizational issue for libraries, which are to be built as both static and dynamic, it doesn't apply to code, which is only to be built as dynamic.