Lars Gullik Bj�nnes wrote:
>
> Nicolas Ferre' <[EMAIL PROTECTED]> writes:
>
> | Hi,
> |
> | Is there someone who succeeds to compile the 1.3 version on AIX5.1
> | (using xforms) ? Alternatively, has someone an idea of what mean the
> | following error messages. This is not the first time that I'm asking for
> | help, but I never had an answer.
>
> It looks like a linker problem...
>
> So it is the compiler the linker, or the libc (not likely).
>
> #include <typeinfo>
>
> class A {};
>
> class B : public A {};
>
> int main() {
> B * b = new B;
> A * a = dynamic_cast<A*>(b);
> typeid(B) == typeid(a);
> }
>
> Does this compile on your box?
>
> g++ -W -Wall -O0 -g dynamic.C -o dynamic
>
No, I get these error messages:
dynamic.C:1: `typeinfo' was not declared in this scope
dynamic.C:3: syntax error before `{' token
dynamic.C:5: parse error before `{' token
dynamic.C: In function `int main()':
dynamic.C:8: invalid use of undefined type `class B'
dynamic.C:5: forward declaration of `class B'
dynamic.C:9: `A' undeclared (first use this function)
dynamic.C:9: (Each undeclared identifier is reported only once for each
function it appears in.)
dynamic.C:9: `a' undeclared (first use this function)
dynamic.C:9: parse error before `*' token
dynamic.C:10: must #include <typeinfo> before using typeid
dynamic.C:8: warning: unused variable `B*b'
> Could this be a pragma implementation/interface problem?
>
> --
> Lgb
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nicolas FERRE' (PhD)
phone/fax : +39-0577-234278
Dipartimento di Chimica
Universita` di Siena mailto:[EMAIL PROTECTED]
via Aldo Moro
53100 SIENA (Italia) http://ccmaol1.chim.unisi.it/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~