digitalmars.D.learn - rpath on macOS
On Linux, this works: ------------ name "myapp" targetType "executable" description "A minimal D application." authors "bartland" copyright "Copyright © 2019, bartland" license "public" libs "mylib" lflags "-L../../_cache/" "-rpath=../../_cache/" ------------ but on macOS with DMD or LDC this gives ------------ ld: unknown option: -rpath=../../_cache/" ------------
Nov 12 2019
On Tuesday, 12 November 2019 at 10:19:30 UTC, cartland wrote:On Linux, this works: ------------ *snip* but on macOS with DMD or LDC this gives ------------ ld: unknown option: -rpath=../../_cache/" ------------Currently I do this post build to get the binary to work: ---------- install_name_tool -add_rpath "../../_cache" myapp ----------
Nov 12 2019
On Tuesday, 12 November 2019 at 10:19:30 UTC, cartland wrote:but on macOS with DMD or LDC this gives ------------ ld: unknown option: -rpath=../../_cache/" ------------IIRC, Mac's ld64 linker requires 2 separated args: "-rpath" "../../_cache/"
Nov 12 2019
On Tuesday, 12 November 2019 at 10:44:07 UTC, kinke wrote:On Tuesday, 12 November 2019 at 10:19:30 UTC, cartland wrote:Brilliant. lflags "-L../../_cache/" "-rpath" "../../_cache/" also works on Linux. Thanksbut on macOS with DMD or LDC this gives ------------ ld: unknown option: -rpath=../../_cache/" ------------IIRC, Mac's ld64 linker requires 2 separated args: "-rpath" "../../_cache/"
Nov 12 2019