Hi Damir,
On Mon, 28 Jan 2002 18:33:42 +0100
Damir Buskulic <buskulic@lapp.in2p3.fr> wrote
concerning "[ROOT] strange pb on cxx6.2":
> Hi,
>
> Does anybody know what this means ? This is when compiling a small
> script with ACliC. Seems like cint introduces some strange symbols (?)
> It even doesn't want to compile an empty file (!)
> ROOT v3/01/06 on alpha / cxx6.2
>
> cxx: Error: /big_data/virgo/users/buskulic/./baaaa#pka.h, line 21: "#"
> not
> expected here
> extern void G__cpp_setup_memfuncbaaaa#pka();
> -------------------------------------^
> cxx: Error: /big_data/virgo/users/buskulic/./baaaa#pka.h, line 21:
> incomplete
> type is not allowed
> extern void G__cpp_setup_memfuncbaaaa#pka();
> ------------^
> cxx: Error: /big_data/virgo/users/buskulic/./baaaa#pka.h, line 21:
> expected a
> ";"
> extern void G__cpp_setup_memfuncbaaaa#pka();
> -------------------------------------^
> cxx: Error: /big_data/virgo/users/buskulic/./baaaa#pka.h, line 22: "#"
> not
> expected here
>
> Any hints anyone ?
CINT uses the input file name to construct the setup functions which
is called when you open the library; it uses these functions to set
up pointers to the extern "C" wrapper functions for you methods in
your class (that is, it loads the `dictionary' :-). Hence, if your
filename is someting like `<foo>.h' it will use the basename
`<foo>pka' to construct the setup functions, like
`G__cpp_setup<setup><foo>()'.
That is, if you're file is called `baaaa#pka.h' the base name will be
`baaaa#pka' and you'll get identifiers in the dictionary file as
`G__cpp_setupmemfuncbaaaa#pka'
which is not a legal identifier, since it contains the character `#'.
Identifiers are of the form (quoting Annex A of the ISO C++ standard):
identifier:
nondigit
identifier nondigit
identifier digit
nondigit:
one of
universal-character-name
_ a b c d e f g h i j k l m n o p q r s t u v w x y z
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
digit:
one of
0 1 2 3 4 5 6 7 8 9
universal-character-name:
\u hex-quad
\U hex-quad hex-quad
hex-quad:
hexadecimal-digit hexadecimal-digit hexadecimal-digit hexadecimal-digit
hexadecimal-digit:
one of
0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F
Another way to put this (ignoring universal-character-name) is
identifer: [a-zA-Z_][a-zA-Z0-9_]*
The solution to your problem? Rename the file `baaaa#pka.h' to
`baaaapka.h'. A word of advice, espcially for Windoze users:
Do not put any other characters in you file names than normal ASCII
letters, underscore and numbers. That is, no spaces, no funny
ligatures, no accented characters, no !, @, #, $, %, ^, &, *, (, ),
-, +, =, `, ~, [, ], {, }, \\, <, >, ? and so on.
Why espacially for Windoze users? Well, they tend to make files named
something like
`This File has a bloody long name - so I can use more disk space and spend more $!.doc'
Real clever.
Yours,
Christian Holm Christensen -------------------------------------------
Address: Sankt Hansgade 23, 1. th. Phone: (+45) 35 35 96 91
DK-2200 Copenhagen N Cell: (+45) 28 82 16 23
Denmark Office: (+45) 353 25 305
Email: cholm@nbi.dk Web: www.nbi.dk/~cholm
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:40 MET