There times when standard locations for libraries and frameworks just don’t cut it. For such times a lineup of environment variables can be used to guide the linker. Typing
man dyld
in the terminal tells the story. Also
otool -L <executable-name>
lists library locations for a given executable.