DMD, LDC, shared objects, rpath

Russel Winder via digitalmars-d-ldc digitalmars-d-ldc at
Mon Jun 19 12:09:36 PDT 2017

On Mon, 2017-06-19 at 18:05 +0100, David Nadlinger via digitalmars-d-
ldc wrote:
> […]
> LDC recognises options starting with "-Wl," and passes them to the
> gcc 
> driver rather than prefixing them with -Xlinker. However, this should
> be 
> equivalent to just leaving off the -Wl, entirely like in your first 
> example. Have a look at the linker command line (ldc2/dmd -v) to see 
> what is going on; there is no magic involved in invoking the linker. 
> Similarly, you can have the gcc driver display the ld command
> invoked.

I am in a bad position to continue proper testing as I have somewhat
suddenly switched form MacPorts to Homebrew – I am not sure when I
tried this, I fear in the MacPorts period which I can no longer test.

> Just as a general hint in case you don't know them already, `otool
> -L` 
> and `install_name_tool` are also useful for dealing with shared 
> libraries on OS X. Also note that D shared libraries are not
> supported 
> by DMD on OS X yet, if that is what you are after.

I had thought shared libraries on OSX were supported by DMD now, but
clearly the rpath stuff is not. I am guessing gdc 6.3.0 doesn't have
shared library support on OSX.

Whilst I don't actually use OSX by choice, yay for LDC. :-)

Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at
London SW11 1EN, UK   w:  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the digitalmars-d-ldc mailing list