[Kde-games-devel] Problem compiling KsirK

Kleag kleag at free.fr
Fri Aug 12 16:34:35 CEST 2005


Surfing threw websvn.kde.org, I think I found what is the problem. This comes 
from libkdegames/kgame/kgamepropertylist.h, in the function below:
uint findIterator(Iterator me)
  {
    Iterator it;
    uint cnt=0;
    for( it = begin(); it != end(); ++it )
    {
      if (me==it) 
      {
        return cnt;
      }
      cnt++;
    }
    return count();
  }

For recent versions of gcc, this should be written:
uint findIterator(Iterator me)
  {
    Iterator it;
    uint cnt=0;
    for( it = Q3ValueList<type>::begin(); it != Q3ValueList<type>::end(); 
++it )
    {
      if (me==it) 
      {
        return cnt;
      }
      cnt++;
    }
    return count();
  }

Other changes may be necessary but I cannot download, compile and test KDE SVN 
immediatly to test further.

Is there someone on the list that could to the necessary changes ? I fear that 
other changes would be necessary to allow compilation of KsirK with KDE SVN. 
For the moment, I must concentrate on finishing KsirK 1.3 but as soon as this 
is finished (maybe next week) I could try KDE SVN and try correct the parts 
of libkdegames used by KsirK.

Superstoned, I'm sorry to write that you probably will have to wait a bit 
before trying KSirK 1.3 :-(

Kleag
Le Vendredi 12 Août 2005 16:18, Kleag a écrit :
> Hello,
>
> So, it seems that the problem you reported at
> http://www.kde-apps.org/content/show.php?content=21450&forummode=2&forumpag
>e=1&forumexplevel=0&forumthread=108364#c108409 comes from KsirK or maybe
> libkdegames/kgame (that's why I CC to the kde-games-devel mailing list).
>
> The compile trace you reported is below:
>  In file included from ../../ksirk/GameLogic/eventslistproperty.h:15,
> from ../../ksirk/GameLogic/gameautomaton.h:15, from
> kplayersetupdialog.cpp:19:
> /usr/kde/devel/include/kgame/kgamepropertylist.h: In member function `uint
> KGamePropertyList::findIterator(QValueListIterator)':
> /usr/kde/devel/include/kgame/kgamepropertylist.h:56: error: there are no
> arguments to `begin' that depend on a template parameter, so a declaration
> of `begin' must be
> available /usr/kde/devel/include/kgame/kgamepropertylist.h:56: error: (if
> you use `-fpermissive', G++ will accept your code, but allowing the use of
> an undeclared name is
> deprecated) /usr/kde/devel/include/kgame/kgamepropertylist.h:56: error:
> there are no arguments to `end' that depend on a template parameter, so a
> declaration of `end' must be
> available /usr/kde/devel/include/kgame/kgamepropertylist.h:64: error: no
> matching function for call to
> `count()' /usr/kde/devel/include/kgame/kgamepropertylist.h: In member
> function `void KGamePropertyList::prepend(const
> type&)': /usr/kde/devel/include/kgame/kgamepropertylist.h:91: error: there
> are no arguments to `begin' that depend on a template parameter, so a
> declaration of `begin' must be
> available /usr/kde/devel/include/kgame/kgamepropertylist.h: In member
> function `void
> KGamePropertyList::save(QDataStream&)':
> /usr/kde/devel/include/kgame/kgamepropertylist.h:184: error: no matching
> function for call to
> `count()' /usr/kde/devel/include/kgame/kgamepropertylist.h:187: error:
> there are no arguments to `begin' that depend on a template parameter, so a
> declaration of `begin' must be
> available /usr/kde/devel/include/kgame/kgamepropertylist.h:187: error:
> there are no arguments to `end' that depend on a template parameter, so a
> declaration of `end' must be
> available /usr/kde/devel/include/kgame/kgamepropertylist.h: In member
> function `void KGamePropertyList::command(QDataStream&, int,
> bool)': /usr/kde/devel/include/kgame/kgamepropertylist.h:206: error: there
> are no arguments to `at' that depend on a template parameter, so a
> declaration of `at' must be
> available /usr/kde/devel/include/kgame/kgamepropertylist.h:225: error:
> there are no arguments to `at' that depend on a template parameter, so a
> declaration of `at' must be available make[3]: *** [kplayersetupdialog.lo]
> Error 1
>
> You say that you use KDE SVN. Is it the branch of KDE 3.x or the future KDE
> 4 ? I don't know exactly where KDE is in the development process...
>
> The problem occurs in a file from libkdegame/kgame, so does someone on the
> list have ideas ?
>
> Thanks.
>
> Kleag

-- 
KsirK - a turn-based strategy game for KDE
http://gna.org/projects/ksirk

KGraphViewer - a GraphViz dot graphs viewer
http://gna.org/projects/kgraphviewer


More information about the kde-games-devel mailing list