Using a shared C library

I’ve been able to successfully load a shared C library and access the functions contained in it.
At a root prompt I’ve done:
.L header1.h+

Unfortunately, the library is made up of 30+ .c and .h files so I have to do a .L command for each header to gain access to the functions. I suppose I only need to do this once and when all the libraries are created I could write a script to gSystem->Load each of the newly created header libraries. Is there an easier way to accomplish this, however, that I’m missing? It would be nice to have a cleaner way of accomplishing this rather than having 30+ .so files for header files.

You could make a single header file that includes all of the other header files, and let the preprocesser do the work for you. You could also edit $ROOTSYS/etc/system.rootmap to include these new symbols (If they’re objects–which they probably aren’t because you mentioned you were using .c files), the newest version of ROOT will automagicaly load your library for you when accessed if their definitions are placed in this file, and the library is placed in $ROOTSYS/lib (or perhaps just on the system library path).

-Jason Thomas.