www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Packaging D libraries, cross compiler compatibility

reply Thomas Koch <thomas koch.ro> writes:
Hi,

I've started a discussion about packaging D libraries and programs for 
Debian:
http://code.google.com/p/d-apt/issues/detail?id=1

From this discussion I learned, that it would make a difference which 
version of which compiler created a library. Isn't it that it doesn't matter 
which C compiler created a library that you want to link against?

Could you point me to more information about this issue? I'm just starting 
to learn D and also don't have practical experience with C.

Regards,

Thomas Koch
Sep 16 2012
parent reply Jacob Carlborg <doob me.com> writes:
On 2012-09-16 09:59, Thomas Koch wrote:
 Hi,

 I've started a discussion about packaging D libraries and programs for
 Debian:
 http://code.google.com/p/d-apt/issues/detail?id=1

  From this discussion I learned, that it would make a difference which
 version of which compiler created a library. Isn't it that it doesn't matter
 which C compiler created a library that you want to link against?

 Could you point me to more information about this issue? I'm just starting
 to learn D and also don't have practical experience with C.

 Regards,

 Thomas Koch

The runtimes are slightly different and the calling conventions are sometimes different. For example, GDC uses the C calling convention of the system wheres DMD uses a slightly modified version. -- /Jacob Carlborg
Sep 16 2012
parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On 16/09/12 12:25, Jacob Carlborg wrote:
 The runtimes are slightly different and the calling conventions are sometimes
 different. For example, GDC uses the C calling convention of the system wheres
 DMD uses a slightly modified version.

If we're talking Debian, the only compilers to consider are GDC and LDC -- DMD is non-free by Debian standards.
Sep 16 2012
parent Jacob Carlborg <doob me.com> writes:
On 2012-09-17 01:33, Joseph Rushton Wakeling wrote:

 If we're talking Debian, the only compilers to consider are GDC and LDC
 -- DMD is non-free by Debian standards.

I'm sure the runtimes are different anyway. Although, I don't know how LDC handles the calling convention. -- /Jacob Carlborg
Sep 16 2012