It seems the rootmap files which are in the same folder as the library are not picked up. How to solve? Should the rootmaps be in a separate library (-rml) which I then gSystem -> Load(). This library cannot be the same as libclass.so?
ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided
Hi,
You don’t have to load the .rootmap files with gSystem->Load(). At least for me it works without.
I think the problem is a different one. As fas as I understand everything the .rootmap files are only used when you automatically add libraries for example by calling TClass::GetClass() on a class which has not yet been loaded, so they have nothing to do with gSystem->Load() where you explicitly load one library file and not a class.
The library files are therefore searched in the paths specified in the $LD_LIBRARY_PATH variable. Have you added the folder where your libraries are located to this variable? If not, add them using export LD_LIBRARY_PATH=<Absolute path of your library folder>:$LD_LIBRARY_PATH
I hope this solves your problem.
What do you mean? What is the actual symptom? (and yes the rootmap file and the library are expected to be in the same directory but depending on your use case and failure this may or may not be related to the failure you see)
OK, so if I understand your problem right, you just want to be able to use autocompletion with your custom class without loading it manually using gSystem->Load() ?
I guess the simplest way of achieving this would be loading the library automatically whenever root is started. This can be achieved by a rootlogon.C macro whichs default location would be your private folder ~. Just create a file ~/rootlogon.C with the content: