#Help for linking a .dylib in macOS

1 messages · Page 1 of 1 (latest)

dapper sluice
vast hedge
#

maybe it's the runner itself as this is the only lib search path listed "/Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/lib" ?

dapper sluice
#

it's invoked as
LD_LIBRARY_PATH=/usr/local/lib zig build test

hallow hare
#

LD_LIBRARY_PATH is for runtime loading.
The traditional LIBRARY_PATH does not currently have any effect with zig's linker (zld).
Something like this should do the trick: exe.addLibraryPath("/usr/local/lib");
and maybe exe.addRPath("/usr/local/lib");