Linking a *.so to a macro


I have a .so library that defines a class that I need to use. Opening the root shell and loading the library via “.L” allows me to access the object “Object o;” and do stuff with it.

However, I want to access the object from a macro that I have, “analysis.C”. I’ve tried using something along the lines of:

gSystem->Load("./"); MyObj obj();
but I get errors telling me that MyObj isn’t defined. How do I go about getting my macro to recognize the object in the .so?


Managed to solve this fairly easily, actually. I simply .L’d the library before running my macro. In the macro, however, I had to #include the header files of all the classes that I’m using from the .so library.