Compilation of arts on HPUX - namespace problems?

Ravikiran Rajagopal <[email protected]>
Newsgroups gmane.comp.kde.non-linux
Message-ID <[email protected]>
Hello,
  I am trying to compile KDE on HPUX 11.00. I am using the latest patched aCC 
compiler. The following is a list of problems that I have managed to solve so 
far. At the end is a problem that is beyond my knowledge of C++.

1. Use the -AA switch to enable STL support.

2. Problem with socklen_t: this problem was described in detail at
   http://lists.kde.org/?l=kde-nonlinux&m=101532403407135&w=2
The solution is to define _XOPEN_SOURCE_EXTENDED. However, a cleaner solution 
is that wherever sys/socket.h is included, it must be included like this:
#ifdef (__HPUX_SOURCE) && ifndef (_XOPEN_SOURCE_EXTENDED)
#define _XOPEN_SOURCE_EXTENDED
#endif
#include <sys/socket.h>
#ifdef (__HPUX_SOURCE) && ifdef (_XOPEN_SOURCE_EXTENDED)
#undef _XOPEN_SOURCE_EXTENDED
#endif
Without this, configure will always fail. The check for socklen_t in 
aclocal.m4(?) needs to be updated too.

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.

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.

Please help,
Ravi

PS: I am cc-ing this to kde-devel in case the C++ wizards there have an 
answer.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.