How to use gInterpreter?

i attached a small program structure containing a src, header ,rootlogon and a macro. It works totally fine if i use for instance gROOT->ProcessLine(…) in my rootlogon or interactively in a root session. This is actually an easy way to include his own classes.
Nevertheless im eager to know how i can run this program using gInterpreter->AddIncludePath(…). I didnt find anything helpful in the forum or in the users guide.
Secondly, what is the advantage using the command .L instead of .L . Why should i even compile it in the first place? (perhaps it is faster…)
Thanks for any help you can provide.
Kevinrootplayground.tar.gz (801 Bytes)

Hi Kevin,

See for info on .L code.C+ (also known as ACLiC).

AddIncludePath() is used to tell the interpreter to also look at other directories when searching for included files. As your example always specifies the (relative) path to the headers you don’t need that.


Hey Alex,
thanks for your response. So what should i do if i wanna use AddIncludePath() instead (theoretically)?

Hi Kevin,

you can convert

#include "../include/foo.h"


#include "foo.h"




1 Like