tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: gcc 4.1 c++ build problem kdegames4



> Trying to build kdegames4 4.6.2 but its tripping up on a GCC 4.1 
> issue:
> 
> /local/src/work/pkgsrc/games/kdegames4/work.i386/kdegames-4.6.2/libkdegames/kgamerenderer.h:
> 211: error: expected ',' or '...' before '>' token
> /local/src/work/pkgsrc/games/kdegames4/work.i386/kdegames-4.6.2/libkdegames/kgamerenderer.h:
> 211: error: wrong number of template arguments (1, should be 2)
> /local/src/work/pkgsrc/games/kdegames4/work.i386/.buildlink/qt4/include/QtCore/qdatastream.h
> :66: error: provided for 'template<class Key, class T> class QHash'
> /local/src/work/pkgsrc/games/kdegames4/work.i386/kdegames-4.6.2/libkdegames/kgamerenderer.h:
> 211: error: default argument missing for parameter 5 of 'QPixmap 
> KGameRenderer::spritePixmap
> (const QString&, const QSize&, int, const QHash<QColor, QColor>&, 
> QColor) const'
> 
> 
> the relevant line of kgamerenderer.h reads
> 
>          QPixmap spritePixmap(const QString& key, const QSize& 
> size, int frame = -1, 
> const QHash<QColor, QColor>& customColors = QHash<QColor, 
> QColor>()) const;
> 
> 
> Apparently this builds fine with GCC4.4 but that doesn't help us 
> and there is an open kde bugreport about it (261488) but that has 
> no help.
> 
> Anyone have suggestions on how to work around this and get it to 
> build with 4.1?
> 
> cheers
> mark

The fix is to put "QHash<QColor, QColor>()" statement in extra parentheses, so 
the definition should look like this:

QPixmap spritePixmap(const QString& key, const QSize& size, int frame = -1, 
const QHash<QColor, QColor>& customColors = (QHash<QColor, QColor>())) const;

Thank you for working on KDE packages. :)

Kind regards,
Adam


Home | Main Index | Thread Index | Old Index