[Kde-games-devel] Re: -DQT_NO_STL in ${KDE4_DEFINITIONS}

Andreas Beckermann b_mann at gmx.de
Sun Dec 19 12:16:46 CET 2010


On Sunday 19 December 2010, Felix Lemke wrote:
> Hello World (of KDE games)
> 
> While writing on a new game (still not sure if the games reaches a playable
> state) I encountered a Problem: Normally in the CMakeLists.txt you have a
> line
> 
> like:
> > add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
> 
> But the variable ${KDE4_DEFINITIONS} contains "-DQT_NO_STL". Before I found
> this, I was quite desperate, because I used QString::toStdString() and the
> 
> compiler said:
> > error: ‘class QString’ has no member named ‘toStdString’
> 
> So, my question is: Is there a reason, why KDE uses QT without STL support?

Google is your friend. First hit for QT_NO_STL leads to
  http://lists.kde.org/?t=115807171500001&r=1&w=2
the decision of that discussion can be found in
  http://lists.kde.org/?l=kde-core-devel&m=115835051806347&w=2

That message also provides the solution to your problem:
"and who wants to can use remove_definitions(-DQT_NO_STL) to have it removed 
for his subproject"

Greetings
Andi


More information about the kde-games-devel mailing list