[Kde-nonlinux] Re: Compilation of arts on HPUX - namespace problems?

Harri Porten kde-nonlinux@kde.org
Thu, 11 Apr 2002 13:05:09 +0200 (CEST)


Hi !

> 3. aCC complains that mcop/datapacket.h is not ISO C++ compliant. This can be 
> fixed by using this->capacity and this->contents in various places. I can 
> send the modified file to those interested.

I fixed that for 3.0.1 already.

> 4. On compiling mcop/common.h, the following error (and similar ones wherever 
> ObjectReference is used) kill the compilation:
> Error 359: "common.h", line 84 # The expression on the left side of the '->'
>     (arrow member access operator) must be a pointer to completed class object
>     type; the type of the left side is 'Arts::ObjectReference *' and 'class
>     ObjectReference' has not been defined yet.
>                     ObjectReference reference(buffer);
>                                     ^^^^^^^^^
> Error 283: "common.h", line 84 # Illegal operand type in call expression.
>                     ObjectReference reference(buffer);
>                                     ^^^^^^^^^
> According to my understanding, a class needs to be declared (not defined) 
> before it is referenced elsewhere. So the error message does not seem to make 
> sense to me.

My interpretation is different: as an object of type ObjectReference is
instanciated the compiler has to see the full definition. As
ObjectReference is only defined in a header that includes common.h I think
the compiler is right and the problem would be non-trivial to fix. Stefan
?

The simples workaround is just to remove those lines and live without aRts
for now.

Harri.