[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: problem building kdesupport/soprano against Qt4.5
From: Brad Hards <bradh () frogmouth ! net>
Date: 2008-08-23 4:52:31
Message-ID: 200808231452.32419.bradh () frogmouth ! net
[Download RAW message or body]
On Friday 22 August 2008 08:46:25 pm Brad Hards wrote:
> On Friday 22 August 2008 04:44:23 pm Thiago Macieira wrote:
> > Yes. We've seen that problem. It happens because:
> >
> > * Soprano uses a namespace
> > * Soprano defined qHash(Soprano::Node) before qhash.h was defined
> > * qvariant.h has changed in 4.5, including qhash.h now
> >
> > That means the definition for QHash jumped above the definition of the
> > qHash function. You have to put the function inside the Soprano namespace
> > for this to work.
>
> OK, that works for me.
Actually, it only worked for kdesupport/soprano.
Now I'm in kdelibs/nepomuk:
[ 88%] Building CXX object nepomuk/core/CMakeFiles/nepomuk.dir/resourcefiltermodel.o
/opt/qt45/include/QtCore/qhash.h: In member function ‘typename QHash<Key, \
T>::Node** QHash<Key, T>::findNode(const Key&, uint*) const [with Key = \
Soprano::Node, T = QHashDummyValue]':
/opt/qt45/include/QtCore/qhash.h:741: instantiated from ‘typename QHash<Key, \
T>::iterator QHash<Key, T>::insert(const Key&, const T&) [with Key = Soprano::Node, T \
= QHashDummyValue]'
/opt/qt45/include/QtCore/qset.h:176: instantiated from ‘QSet<T>::const_iterator \
QSet<T>::insert(const T&) [with T = Soprano::Node]'
/opt/qt45/include/QtCore/qset.h:297: instantiated from ‘QSet<T> QList<T>::toSet() \
const [with T = Soprano::Node]'
/home/bradh/devel/kde-src/kdelibs/nepomuk/core/resourcefiltermodel.cpp:100: \
instantiated from here
/opt/qt45/include/QtCore/qhash.h:860: error: no matching function for call to \
‘qHash(const Soprano::Node&)'
/opt/qt45/include/QtCore/qhash.h:65: note: candidates are: uint qHash(char)
/opt/qt45/include/QtCore/qhash.h:66: note: uint qHash(uchar)
/opt/qt45/include/QtCore/qhash.h:67: note: uint qHash(signed char)
/opt/qt45/include/QtCore/qhash.h:68: note: uint qHash(ushort)
/opt/qt45/include/QtCore/qhash.h:69: note: uint qHash(short int)
/opt/qt45/include/QtCore/qhash.h:70: note: uint qHash(uint)
/opt/qt45/include/QtCore/qhash.h:71: note: uint qHash(int)
/opt/qt45/include/QtCore/qhash.h:72: note: uint qHash(ulong)
/opt/qt45/include/QtCore/qhash.h:80: note: uint qHash(long int)
/opt/qt45/include/QtCore/qhash.h:81: note: uint qHash(quint64)
/opt/qt45/include/QtCore/qhash.h:89: note: uint qHash(qint64)
/opt/qt45/include/QtCore/qhash.h:90: note: uint qHash(QChar)
/opt/qt45/include/QtCore/qhash.h:91: note: uint qHash(const \
QByteArray&)
/opt/qt45/include/QtCore/qhash.h:92: note: uint qHash(const QString&)
/opt/qt45/include/QtCore/qhash.h:93: note: uint qHash(const \
QStringRef&)
/opt/qt45/include/QtCore/qhash.h:94: note: uint qHash(const \
QBitArray&) make[2]: *** [nepomuk/core/CMakeFiles/nepomuk.dir/resourcefiltermodel.o] \
Error 1 make[1]: *** [nepomuk/core/CMakeFiles/nepomuk.dir/all] Error 2
make: *** [all] Error 2
[1]+ Done xemacs \
/home/bradh/devel/kde-src/kdelibs/nepomuk/core/resourcefiltermodel.cpp (wd: \
~/devel/kde-build/kdelibs-build) (wd now: ~/devel/kde-build/kdelibs-build/nepomuk
I did the same kind of namespace wrapping:
===================================================================
--- nepomuk/core/resourcefiltermodel.cpp (revision 850712)
+++ nepomuk/core/resourcefiltermodel.cpp (working copy)
@@ -41,13 +41,13 @@
using namespace Soprano;
-
+namespace Soprano {
uint qHash( const Soprano::Node& node )
{
return qHash( node.toString() );
}
+}
-
class Nepomuk::ResourceFilterModel::Private
{
public:
and it now compiles, but won't link:
Linking CXX shared library ../../lib/libnepomuk.so
CMakeFiles/nepomuk.dir/resourcefiltermodel.o: In function `QHash<QUrl, \
QHashDummyValue>::findNode(QUrl const&, unsigned int*) const': \
resourcefiltermodel.cpp:(.text._ZNK5QHashI4QUrl15QHashDummyValueE8findNodeERKS0_Pj[QHash<QUrl, \
QHashDummyValue>::findNode(QUrl const&, unsigned int*) const]+0x2a): undefined \
reference to `qHash(Soprano::Node const&)'
collect2: ld returned 1 exit status
Brad
> > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic