Is there a way to run ROOT classes with the general g++

Dear experts,

I have a question concerning the approach to compile ROOT classes with g++ (or any if it possible). As I am trying to port/rebuild a simple application running in ROOT framework to run in an android application.

However, the ported target application calls some basic ROOT classes (i.e. TH1D).
So my question is that is there any approach to run ROOT classes out side the ROOT environment?
Any advice or suggestions would be appreciated. :cry:


it depends what you mean “outside the root environment”.
ROOT is made of shared libraries and as such those can be used in any kind of standalone program.
For the compilation and linking, the correct include paths, library paths and library names shall be provided, but this is bread and butter for every kind of C++ project.
ROOT provides a tool to create a string with some sensible default flags for the compiler, root-config. An example compilation line looks like

g++ -o myExecutable [my sources] `root-config --cflags --libs`

I hope this helps.