Linking a *.so to a macro

Hi,

I have a .so library that defines a class that I need to use. Opening the root shell and loading the library via “.L lib.so” 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("./libJetUncertainties.so"); 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?

Thanks,
Nilay

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.