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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.