RE: [ROOT] Problems with #include "path/file.h" in CINT script.

From: Philippe Canal (pcanal@fnal.gov)
Date: Wed Jul 18 2001 - 18:24:09 MEST


Philippe Canal writes:
 > Hi Brett,
 > 
 > MacroPath does not have a bug making it fails if '.' is
 > the first directory.  Try 
 > 
 > root [0] gROOT->SetMacroPath("$MYPATH:.")

> Hmm, this works for you?

It worked for me, because I happened to have the main macro file
in the $MYPATH directory and cint always look for #include inside
the directory of the main macro.

So I am not sure that the MacroPath does NOT intervene in anyway
shape or forms to resolves any #include statement inside a macro.

You need to actually use the ".include" cint command to have any
affect.

So in your case your probably need to do something like:

 root [0] #include <strstream>
 root [1] ostrstream s;
 root [2] s << ".include " << gSystem->Getenv("MYPATH") << ends;
 root [3] gROOT->ProcessLine(s.str());

Cheers,
Philippe.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:52 MET