From 7ff5c0d3bcfd370b81d4138794ec9c2529295339 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Tue, 15 Nov 2022 23:21:17 -0500 Subject: [PATCH] Set search paths for included files for ROOT C++ interpreter (#441) It is my understanding that `TSystem::AddIncludePath()` sets search paths to look for header files only when ACLiC is used. On the other hand, `TInterpreter::AddIncludePath()` sets search paths used by the both interpreter and ACLiC (see the documentation at https://root.cern/root/html534/TCint.html#TCint:AddIncludePath) --- StRoot/macros/rootlogon.C | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/StRoot/macros/rootlogon.C b/StRoot/macros/rootlogon.C index 3edf950a6c0..16c3b1623f9 100644 --- a/StRoot/macros/rootlogon.C +++ b/StRoot/macros/rootlogon.C @@ -30,5 +30,10 @@ std::cout << " *** Start at Date : " << TDatime().AsString() << std::endl; - gSystem->AddIncludePath(" -I. -I./.$STAR_HOST_SYS/include -I./StRoot -I$STAR/.$STAR_HOST_SYS/include -I$STAR/StRoot -I/usr/include/mysql"); + gInterpreter->AddIncludePath("."); + gInterpreter->AddIncludePath("./.$STAR_HOST_SYS/include"); + gInterpreter->AddIncludePath("./StRoot"); + gInterpreter->AddIncludePath("$STAR/.$STAR_HOST_SYS/include"); + gInterpreter->AddIncludePath("$STAR/StRoot"); + gInterpreter->AddIncludePath("/usr/include/mysql"); }