Benches macOS

3

LD_LIBRARY_PATH in 10.5

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

What replaces the functionality of LD
LIBRARYPATH in Leopard? Do I have to type -L <path> everywhere now?

I notice that ld64 in 10.4 also does not support LD
LIBRARYPATH, is there a way around this?

3 replies

Sign in or join Beachball Help to reply.

  1. 0

    etresoft

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Dr. T wrote:

    What replaces the functionality of LD
    LIBRARYPATH in Leopard?

    A modern operating system.

    Do I have to type -L <path> everywhere now?

    No. You shouldn't have to type -L anywhere. If you need a library that isn't included by the system, you should package that library up with your application.

  2. 0

    Doug Reeder

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Dr. T

    The Apple faithful aren't fond of it but DYLD
    LIBRARYPATH provides the functionality that you get from LD
    LIBRARYPATH in other unix/linux os's.

    Doug Reeder

  3. 0

    Dr. T

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks for your reply. To clarify, I am not talking about LD
    LIBRARYPATH as it behaves on Linux, but how it behaves in pre-10.5 Mac OS X.

    E.g. on Mac OS 10.4, the following might all have the effect of ld linking to /some/dir/libxx.a:

    cc ... -L /some/dir -lxx

    or

    setenv LD
    LIBRARYPATH /some/dir

    cc ... -lxx

    or

    cc ... /some/dir/libxx.a