DMD and GDC static libraries are incompatible on Linux?

Iain Buclaw via D.gnu d.gnu at puremagic.com
Wed Feb 18 14:34:56 PST 2015


On 18 February 2015 at 22:13, Jeremy DeHaan via D.gnu
<d.gnu at puremagic.com> wrote:
> On Monday, 9 February 2015 at 19:24:22 UTC, Iain Buclaw wrote:
>>
>> GDC and DMD are not ABI compatible.  There are many reasons why this
>> is so, but the one that is likely affecting you is because DMD emits
>> references to symbols that do not exist in GDC's runtime library.
>>
>> Iain.
>
>
> I was thinking about this today and I had another question. What about
> shared libraries? If I were to release a library on Linux in shared library
> form, would it be compatible between compilers?


The answer would still be no because of calling convention differences
- another reason why GDC and DMD are not ABI compatible.

However, if you used an extern(C) API, then that should be at least
some guarantee of shared library compatibility.

Iain.


More information about the D.gnu mailing list