Error: const class QString’ has no member name ‘toStdString’, QT 4.6.3 in Kubuntu 11.10



  • hello all,
    I have a problem trying to compile a source,
    and displays the following error 'const class QString’ has no member name ‘toStdString’'. in Kubuntu 11.10 with QT 4.6.3
    but, I have the same version of QT on Kubuntu 8.04 and compiled without problems

    I can be doing wrong?

    thanks for your answers, have a good day


  • Moderators

    welcome to devnet

    Qt may be compiled with different settings. There is an option allowing the use of standard strings. If this has not been switched on you may receive such an error message.

    You can download a version of Qt and compile it with string support. That is fairly easy.

    [edit] It is not string support, but stl-support

    "toStdString":http://developer.qt.nokia.com/doc/qt-4.8/qstring.html#toStdString description sais:

    [quote]
    This operator is only available if Qt is configured with STL compatibility enabled.
    [/quote]



  • [quote author="koahnig" date="1326398093"]welcome to devnet

    Qt may be compiled with different settings. There is an option allowing the use of standard strings. If this has not been switched on you may receive such an error message.

    You can download a version of Qt and compile it with string support. That is fairly easy.

    [edit] It is not string support, but stl-support

    "toStdString":http://developer.qt.nokia.com/doc/qt-4.8/qstring.html#toStdString description sais:

    [quote]
    This operator is only available if Qt is configured with STL compatibility enabled.
    [/quote][/quote]

    Thanks for answering!,

    try to compile the qt version of STL support (according to documentation is the default), including explicit

    . /configure -stl

    but did not work on linux kubuntu 11.10 at 8.04 if it works without problem.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.