Linking libraries - use of undeclared gSystem

Hi All,

I have a macro that prepares a TProof and then processes a TDSet via another C file:

auto dset_channel = new TDSet("TTree", "nominal");
auto fProof_channel = TProof::Open("workers=4");

Inside the Processor class, I have an #include to a file with many functions that I want to use. However, it starts to complain about the use of unidentified objects. Such as, TMath::Pi(), TColor, etc… even though when I run a macro using “root -l -b -q xxx.C” it never complained.

I added a bunch of #includes to overcome the errors but now I get “error: use of undeclared identifier ‘gSystem’” . I don’t know what I should do so I can use gSystem through TProof.

Is there some magical way to link the libraries so that the objects I can use with “root -l -b -q” are also available through the Processor via TProof?

Thanks for your help,

In order to use gSystem you need to include the TSystem ROOT header: #include TSystem.h

Thanks for your answer. That solved that error, thanks!

I have another small problem. For running the Processor.C, I need to add some parameters to the fProof file, which I do with:


and I also load the file for the class of job_params:


However, inside JobParams I have an #include to another file that has some functions I want to use. When I try to run the code I get an error of the sort:

././JobParams.h:10:10: fatal error: 'macros/methods.h' file not found
#include "macros/methods.h"
09:28:15 22510 Wrk-0.0 | Error in <ACLiC>: Dictionary generation failed!

Do I need to do something to link this “macros/methods.h” file? Should I somehow declare the whole path to the file?

It seems that you are compiling with ACLiC so I would say you need to specify first an include path so that your header is found:

If you run TSystem->AddIncludePath("path/to/your/headers") it should work.


I ended up doing:


I guess your solution would’ve also worked

Sorry to bother again. I get the thing to work but if I want to include anything I start getting errors. Now I have:

error: no type named 'RDataFrame' in namespace 'ROOT'

How can I know what to include? I tried the obvious <RDataFrame.h> but didn’t work.


You get the name of the include file for a given class at the end of its reference guide page. (scroll to the bottom of the page)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.