Using rootmap files when building standalone application?

Hi,
I’m building a few standalone applications (i.e. not run within an interactive ROOT session) that use libraries outside of the ‘core’ libraries. That is, whilst I can easily get a list of core libraries to link the app with out of the root-config script, if I need to link in any ‘extra’ libraries, say Eve or TMVA, I get linking errors because these libraries aren’t linked to their dependencies.

All of the dependency information is in the rootmap files, so I was wondering if there’s a ‘standard’ (read : easy!) way to extract the list of library dependencies from a rootmap file? I can see how to use rlibmap to create a rootmap file, but I couldn’t see anything obvious to do a reverse query (apologies if I missed something…). Or am I being stupid :confused: , and there’s a much better way to access ‘non-core’ libraries and their dependencies from an external app?

Cheers,

Ben.

Hi Ben,

The following should do:echo 'TString libs(gInterpreter->GetSharedLibDeps("libTMVA")); libs.ReplaceAll("lib","-l").ReplaceAll(".so",""); printf("%s\n",libs.Data());' | root.exe -b -l

Cheers,
Philippe.

Or you could put the C++ in nameds script: root.exe -b -l -q 'getDeps.C(“libTMVA”)"

Thanks Philippe!