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

From: Brett Viren (bv@bnl.gov)
Date: Tue Jul 17 2001 - 19:59:30 MEST


Hi,

If I have "/full/path/to/somepath" in my MacroPath and I have:

	#include "somepath/A.h"

in an "A.C" file, then ".x A.C" it fails.  I can reproduce this with
the following session:


bash> cd /full/path/to/somepath
bash> cd ..
bash> export MYPATH=`pwd`
bash> cd somepath
bash> cat A.h
#ifndef A_H
#define A_H
#define ADEF 42
#endif  // A_H
bash> cat A.C
#include "somepath/A.h"
void A()
{
    cerr << "Hi, from A! ADEF = " << ADEF << endl;
}
bash> root
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   3.01/06      16 July 2001   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

FreeType Engine v1.x used to render TrueType fonts.

CINT/ROOT C/C++ Interpreter version 5.15.07, July 7 2001
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] gROOT->SetMacroPath(".:$MYPATH")
root [1] .x A.C
Error: cannot open file "somepath/A.h"  FILE:A.C LINE:2
*** Interpreter error recovered ***


Am I doing something wrong?

Thanks,
-Brett.



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