User libraries are normally in /usr/local/lib
. However I want to build some third party libraries in for example /Users/user/Public/lib
.
I only want to do it during my testing. Is there a elegant way to do this?
I'm using fish shell for OSX.
Assuming the library path is selected using the LD_LIBRARY_PATH environment variable, you could do
env LD_LIBRARY_PATH=/Users/user/Public/lib fish