I found a solution to my problem, thanks to suggestions from you wise monks.
macOS uses the environment variables 'DYLD_LIBRARY_PATH' and 'DYLD_FALLBACK_LIBRARY_PATH' for the location of dynamic libraries or 'dylibs'. From the Terminal app, I was able to load the Rmath dylib successfully by entering
export DYLD_LIBRARY_PATH=/thepathbefore running my Perl scripts.
Then I tried setting this variable in my Perl script, but this didn't work. Apparently, the variable must be set in the process that runs Perl. My software runs within TextMate, which uses Ruby to execute programs. So, I added a single line of Ruby code prior to executing Perl,
ENV['DYLD_LIBRARY_PATH'] = "#{ENV["TM_BUNDLE_SUPPORT"]}/lib/perl5"This did the trick. Now I'm back to productive work. Thanks again to all.
In reply to Re^6: XSLoader/DynaLoader Can't Locate Library
by wbirkett
in thread XSLoader/DynaLoader Can't Locate Library
by wbirkett
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |