Hello,
I have a python script that loads a macro written in C++ that I would rather not translate into python. I have the macro in a particular directory “/path/to/Macro/Macro.C”. I load the macro into python with
import ROOT
from ROOT import gROOT
gROOT.LoadMacro("/path/to/Macro/Macro.C+")
I have moved the python script into /usr/local/bin (maybe this is where the issue is) so that I can run it from any directory. When I execute it for the first time it runs fine and the gROOT.LoadMacro() creates file *.pcm, *.so and *.d in the same directory as the Macro. However if I change directories and run the python script again it fails with:
cling::DynamicLibraryManager::loadLibrary(): dlopen(/Users/Code/Macro_C.so, 9): Library not loaded: @rpath/libHist.so
If I delete all the extra files and run again it runs fine. I am just not sure how to be able to keep the macro in a certain directory and run the script how I want to without having to delete the shared library each time. I have tried moving the macro the the root/macros directory and that did not change the behavior.
Thank you,
_ROOT Version:6.16.00
_Platform:OSX 10.14.5
Compiler: Not Provided