rpath options to linkers, OSX issue
Mike Wey via Digitalmars-d
digitalmars-d at puremagic.com
Sun Sep 7 01:39:26 PDT 2014
On 09/06/2014 05:51 PM, Russel Winder via Digitalmars-d wrote:
> Ariovistus originally reported Issue 2940 against SCons and the D
> toolset (http://scons.tigris.org/issues/show_bug.cgi?id=2940). The gdc
> tool uses "-Wl,-rpath=." in the gdc command to set the rpath for gdc.
> The dmd tool uses "-L-rpath=." in the dmd command to set the rpath for
> dmd.
>
> This all works fine on Linux. I haven't managed to find a way to test
> this on Windows.
>
> It seems for the first time (which surprised me as I thought I had
> checked this), I am running the tests on OSX and "-L-rpath=." generates
> "-rpath=." to the ld which is Clang and it rejects this option.
>
> I am assuming the problem is in my OSX set up and not in what dmd is
> doing. I get dmd via MacPorts, it is v2.066-devel.
>
> Is there an OSX user out there having no problem with dmd and dynamic
> libraries I can prevail upon to give me a hand with this?
Windows doesn't support rpath or something like it, the best alternative
there would be using "SetDllDirectory" or "AddDllDirectory" in the
executable.
For OSX this might help:
http://stackoverflow.com/questions/4513799/how-to-set-the-runtime-path-rpath-of-an-executable-with-gcc-under-mac-osx
--
Mike Wey
More information about the Digitalmars-d
mailing list