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

From: Philippe Canal (pcanal@fnal.gov)
Date: Tue Jul 17 2001 - 23:59:59 MEST


Hi Brett,

Looking at your example, it is seems to exhibit the expected behavior.
Here are relevant extract:

bash> cd /full/path/to/somepath
bash> cd ..
bash> cd somepath
....
#include "somepath/A.h"
....
root [1] .x A.C
Error: cannot open file "somepath/A.h"  FILE:A.C LINE:2
....
which is normal since you are already in 'somepath'.

Philippe.

Ps. otherwise it seems to work.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Brett Viren
Sent: Tuesday, July 17, 2001 1:00 PM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] Problems with #include "path/file.h" in CINT script.


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