Hi,
I try to link to a dynamic library on MacOS - but couldn’t figure out what information I would have to add to the Projucer in order to make the executable find the library. I suppose that I would have to add some @rpath and @loader_path linker flags in the “Config > Xcode > Extra linker flags” field - but whatever I tried, it wouldn’t work…
When copying libantlr4-runtime.dylib into the directory of the executable (Builds/MacOSX/build/Debug) and starting it from the same directory via the command line everything works. But there should be some better way to proceed…
Here the error I get:
dyld: Library not loaded: libantlr4-runtime.dylib
Referenced from: /Users/dietrich/home/cs/lang/compiler/antlr/projects/cpp/2017-05-08.cpp-demo/000/demo/Builds/MacOSX/build/Debug/demo
Reason: image not found
(lldb)
There are a number of other postings concerning this topic, but none provided a working solution. So I decided to ask once again…
Thanks for your help,
Regards, Dietrich
