Creating an application: root-config: TreeViewer missing?


ROOT Version: 6.32.04
Platform: linuxx8664gcc
Compiler: c++ (Ubuntu 13.2.0-23ubuntu4) 13.2.0


Hello,

Thank you for your manual to Create a user application with ROOT.

I try the following command to link ROOT libraries but TreeViewer seems to be missing:

$ docker run rootproject/root:6.32.04-ubuntu24.04 root-config --glibs --cflags --libs | tr ' ' '\n'
-L/opt/root/lib
-lGui
-lCore
-lImt
-lRIO
-lNet
-lHist
-lGraf
-lGraf3d
-lGpad
-lROOTVecOps
-lTree
-lTreePlayer
-lRint
-lPostscript
-lMatrix
-lPhysics
-lMathCore
-lThread
-lMultiProc
-lROOTDataFrame
-Wl,-rpath,/opt/root/lib
-pthread
-lm
-ldl
-rdynamic
-pthread
-std=c++17
-m64
-I/opt/root/include
$ docker run rootproject/root:6.32.04-ubuntu24.04 root-config --glibs --cflags --libs | tr ' ' '\n' | grep "lTreeViewer"

Is it normal?

Best Regards,

Yes, not ideal. There are many missing libraries in root-config.

My suggestion is to just include the libraries you need for your program.

For example, if you need the class TTreeViewer, you would go to ROOT: TTreeViewer Class Reference

scroll all the way down, and there it tells you it belongs to library -lTreeViewer.

Many libraries TreeViewer, TreePlayer are plugins that are not intended to use be used directly and are automatically loaded when (indirectly) needed and thus should not be listed in root-config --libs

It’s weird though that TTreePlayer is listed by --libs

yes it is weird :frowning: