QT5 with MINGW?



  • Hi,

    I'm working with QT4.8.4 with MinGW at the moment. But the problem is that the GDB Debugger is not working at all.
    If i start debugging a window appears which says (interpreting translation) "GDB: Has been stopped/closed".

    OK I have three work stations and only one of them is able to run the debugger.

    Now i need to update to QT5 rc2 anyway but the windows package uses the msvc2010 compiler!?
    Is it possible (and how) to get QT5 using MinGW? Because the msvc is not compiling my projects without complaining about things like:
    @QByteArray b;
    QDataStream in(&b, QIODevice::ReadOnly);

    unsigned short i;
    in>>i; //error: Binary operator >> ... Type "unsigned short" not compatible ... bla bla
    @

    It doesn't find some files either...

    Is anybody using MinGW with QT5?


  • Moderators

    I think it's still being worked upon, but you can certainly try compiling Qt5 from source. "Here":http://qt-project.org/wiki/Building_Qt_5_from_Git is a tutorial on that.



  • Yes.

    You cannot use the MSVC2010 binaries with MinGW; you will have to compile Qt 5 using MinGW.



  • Ok thanks guys, i will give it a try!



  • OK... I got along with msvc2010 so far because most of the errors are not the compilers fault but the fault of QT5.
    I meanwhile converted most of my very huge project. I got errors like QString::fromAscii() QString::toAscii() not known bla bla. (replaced it with toLatin1()/fromLatin1()) and many more.

    How can the QT guys remove base type methods anyways? This costs a lot of time. Everything worked fine before. Now some methods are just gone... Some paths are different...
    That's sad. Really!



  • Actually, you can't use Qt 5 with MinGW because QtWebKit module doesn't compile at the moment with MinGW.

    And @Seraph Qt 5 didn't remove the methods. The methods are still there and work as usual.


  • Moderators

    [quote author="lilian.moraru" date="1355940709"]Actually, you can't use Qt 5 with MinGW because QtWebKit module doesn't compile at the moment with MinGW.[/quote]

    You can compile it without QtWebKit, if that is the only point where MinGW fails.



  • [quote author="Seraph" date="1355927615"]OK... I got along with msvc2010 so far because most of the errors are not the compilers fault but the fault of QT5.
    I meanwhile converted most of my very huge project. I got errors like QString::fromAscii() QString::toAscii() not known bla bla. (replaced it with toLatin1()/fromLatin1()) and many more.

    How can the QT guys remove base type methods anyways? This costs a lot of time. Everything worked fine before. Now some methods are just gone... Some paths are different...
    That's sad. Really![/quote]

    Ok, just made a Qt 5 application on Linux and looks like, yes, QString::fromAscii() and toAscii() are not there any more, the private helper functions are still there.


  • Moderators

    [quote author="lilian.moraru" date="1355948113"]Ok, just made a Qt 5 application on Linux and looks like, yes, QString::fromAscii() and toAscii() are not there any more, the private helper functions are still there.[/quote]

    Correct. Both methods were flawed and Thiago removed them right at the beginning of Qt5 development. Use toLatin1(). If I remember correctly, that is. On the other hand, static members of QUrl finally work well.



  • Then why release Qt now when there are so many flaws. I believe it could used alot more work. But for now i will continue working with the old Qt versions till better comes in January :-)


  • Moderators

    [quote author="Kode@Hue" date="1355987469"]Then why release Qt now when there are so many flaws. I believe it could used alot more work. But for now i will continue working with the old Qt versions till better comes in January :-)[/quote]

    What? Those methods were removed because they were flawed it means that when you stick to Qt4, you will be using the very code that needs more work! In Qt5 it is improved, in Qt4 it is not.

    On the other hand, I do feel Qt5 release was pushed out a little bit too soon. No biggie, though, it's still great.



  • It is no argument to say that it is better or the old methods are causing more work.
    I have so much work converting my QT4 projects into QT5 just because of things like that.
    The right way would have been to mark it as deprecated for the next 5 years and then remove it in Qt6 or 5.8 or smth.
    But no offense to anybody personal.


  • Moderators

    Yes, Seraph, I have similar feelings towards many decisions taken in Qt5. But, it's released, ABI is frozen until Qt 6, so no need to worry anymore ;) It will not change anytime soon.

    I understand you are not talking about toAscii(), anyway, as this is a simple task for grep or Qt Creator replace (toAscii -> toLatin1).


Log in to reply
 

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