Hi Jan,
On Fri, 2004-11-05 at 13:37 +0100, Jano Hruby wrote:
> Hello,
> in your $ROOTSYS/test/EventTree_Proc.h:
>
> #include <TChain.h>
> ...
> #include "TH1.h"
>
> why not <TChain.h> and <TH1.h> or "TChain.h" and "TH1.h" ?
> How is "more correct, clean" using <xxx.h> or "xxx.h" (under linux, gcc
> and compile with make from $ROOTSYS/test/Makefile) ?
>From the GNU CPP 3.3 manual:
`#include <FILE>'
This variant is used for system header files. It searches for a
file named FILE in a standard list of system directories. You can
prepend directories to this list with the `-I' option (*note
Invocation::).
`#include "FILE"'
This variant is used for header files of your own program. It
searches for a file named FILE first in the directory containing
the current file, then in the same directories used for `<FILE>'.
So by this logic, when one includes header files from third-party
packages, one should use `<FILE>' as it will not search in the current
directory first. Note, that exported header files should also use
`<FILE>' as third-parties may include that header. I think this goes
for any POSIX platform.
I think the real question is why not `<root/TObject.h>' rather than
`<TObject.h>'. If that was the case, one wouldn't need to specify any
additional search path to the preprocessor if one installed ROOT in
`/usr' of `/usr/local'.
Yours,
--
___ | Christian Holm Christensen
|_| | -------------------------------------------------------------
| | Address: Sankt Hansgade 23, 1. th. Phone: (+45) 35 35 96 91
_| DK-2200 Copenhagen N Cell: (+45) 24 61 85 91
_| Denmark Office: (+45) 353 25 404
____| Email: cholm@nbi.dk Web: www.nbi.dk/~cholm
| |
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET