[kde-solaris] KDE 3.1RC3 Compile Problem
Thu Nov 21 17:52:12 2002
On Thu, 21 Nov 2002, Cory C. Omand wrote:
> Thanks for your reply - I made it past this problem. The first thing I
> tried was to make the access protected, but this had other, less
> understandable side effects. As the ItemList is really only referred to
> by the inner class, I just added it to the private section of the Item
> class KAccelleratorManagerPrivate
> class Item
> typedef QPtrList<Item> ItemList;
> This compiles with no warnings, although I'm not fully aware at this
> point what the effect of the change will be. I couldn't even get the
> code to compile if I switch the order of the public/private sections
> within ::Item, so something is definitely wierd with my build system.
Since it was private to begin with, it shouldn't have any impact on
anything except that class anyway... I wouldn't worry about it.
> Now that I'm through this block (though maybe only temporarily, if I've
> modified critical functionality in KAcceleratorManager), I am getting
> hung up with kmainwindow.cpp. There is a package private variable named
> no_query_exit which is giving me a huge headache. When compiled as
> normal, I get a link error:
> Undefined first referenced
> symbol in file
> There are other package private variables that are accessed from various
> areas of the file (e.g. ksm, ksmd), which do not give any link time
> errors. The difference seems to be that no_query_exit is referred to
> from within a class declaration, while the others are referred to from
> function definitions. E.g.
> class KMWSessionManaged : public KSessionManaged
> bool commitData( QSessionManager& sm )
> ::no_query_exit = true;
> vs. this:
> void KMainWindow::initKMainWindow(const char *name)
> if ( !ksm )
> ksm = ksmd.setObject(new KMWSessionManaged());
> Nothing I have tried so far, short of commeting no_query_exit out
> altogether, makes kmainwindow.cpp compile! On a related note, I
> attempted an experiment to build a separate tree using GCC 3.2 on the
> same machine - it failed horribly while compiling QT 3.1.0.
This might actually be a Sun compiler bug. Did you try cutting the inline
code away and moving it lower? It might think that inline code cannot see
the global static no_query_exit...
So move bool commitData( QSessionManager& sm ) out of the class
definition and leave only the prototype...
> P.S. For those wondering, my capacity within Sun is not related to
> window managers whatsoever - this is a sideline interest for me.