Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

astropig

macrumors newbie
Original poster
Mar 1, 2014
3
0
On my new Mac Pro, if I do a
gfortran test.f
I get an error message saying that it cannot find libfortran.spec. However, the library is indeed there in /usr/local/lib. If I explicitly do a
gfortran -L /usr/local/lib test.f
everything works fine.

On my MacBook Air laptop (running the same 10.9.2) I never have had to specify the library location. I've done a printenv on both machines, and while there is a lot more "stuff" on my MacBook Air, it's not clear what/where any flags are being set there. What do I have to do to make sure the Mac Pro automatically goes looking in /usr/local/lib for libraries?

Sorry for this question being so basic.
 

aly

macrumors member
Jul 3, 2006
88
0
Scotland
I may be way off the mark. But is this not just a case of updating the PATH in your profile?

Google for something like "Change PATH variable on Mac" and it should point you in the right direction.
 

astropig

macrumors newbie
Original poster
Mar 1, 2014
3
0
I'm afraid not. The PATH controls where it will go looking for an executable, but my understanding (which may be flawed) is that it goes looking for libraries is controlled otherwise. Regardless, adding /usr/local/lib to my path didn't solve it, but thanks for the suggestion.
 

aly

macrumors member
Jul 3, 2006
88
0
Scotland
Ah sorry, I had executable in my head I wasn't thinking that you were using a library. I hope you find an answer!

Edit: Some googling seems to suggest DYLD_LIBRARY_PATH is what needs to be updated but there is a tool for doing this rather than editing manually.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.