Hi,
I am trying to work with make files and it works fine, in the sense that it “makes” fine and doesnt complain
but when I run it I get the following error
Load Error: Failed to load Dynamic link library /afs/cern.ch/user/f/fsoomro/RichMDM/27may/./lib/libwhatever.sl
(int)(-1)
I have got one file in my src directory and one in the include directory.
Can anyone tell me what mistake am I making?
I cannot tell. You’ll have to at least provide us with the Makefile you’re using. Alternatively you could just do “.L myfile.cxx+” within ROOT, that way you don’t need to write or maintain any Makefile and the result is the same.
I do work with the .L filename ++ but I wanted to move to make file since it becomes increasingly difficult when the number of files increases.
So I was just trying out using only one file at the moment…
I don’t see anything wrong with your Makefile. Is there no other message but “Load Error: Failed to load Dynamic link library /afs/cern.ch/user/f/fsoomro/RichMDM/27may/./lib/libwhatever.sl
(int)(-1)”? Usually it should also state why it failed - missing symbol or whatever. Is there any library other than the libCore and libCint that libwhatever depends on? You’ll have to load them into ROOT before loading libwhatever. I cannot access the library; otherwise I could have checked what it depends on.
On the “.L whatever.C+”: you can #include several sources in one source, and then just load that one source into ROOT. Or you can write a driver script that calls gROOT->ProcessLine(".L file1.C+") for all the files that you need to load. That way you stay platform independent; converting your Makefile into something that works e.g. on a Mac or on Windows is much, much more work.