.include command

Jacek M. Holeczek (holeczek@clri6f.gsi.de)
Tue, 21 Jan 1997 19:01:58 +0100 (CET)


> The .include command, I suppose, should show the path for include files.
> Well. How can I change this path ?
I had the same problem some time ago.
If you use the cint itself you can use a special "-I" flag when invoking
it to set the default include path. Unfortunately the root does not
recognize such a flag ;-( . There is, however a trick to help us :-) .
Use :
----------------------------------
{#pragma includepath /bla/bla/bla}
{#pragma includepath /ple/ple/ple}
...
----------------------------------
Note :
1. ONLY ONE INCLUDE-PATH PER #PRAGMA !!!
2. DON'T FORGET {} IF YOU USE THIS PRAGMA FROM A ROOT COMMAND
LINE !!! You DON'T need {} if you use it inside of your C/C++
source code which you then load into root using the ".L"
root/cint command.
Hope this helps.
Jacek.
P.S. What you should get :
----------------------------------
clri6f:root
*******************************************
* *
* W E L C O M E to R O O T *
* *
* Version 0.90/12 17 January 1997 *
* *
* You are welcome to visit our Web site *
* http://root.cern.ch *
* *
*******************************************

CINT/ROOT C/C++ Interpreter version 5.11.29, Dec 5 1996
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] .include
include path:
root [1] {#pragma includepath /bla/bla/bla}
root [2] .include
include path: -I/bla/bla/bla
root [3] {#pragma includepath /ple/ple/ple}
root [4] .include
include path: -I/bla/bla/bla -I/ple/ple/ple
root [5]
----------------------------------
Jacek.