Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

g++ has stopped working in windows 10



  • I have been using qt with c++ for some time. I just upgraded to windows 10 and I am getting an error when I try to compile a program. I think I may need to update minGW? I have found some issues on the web regarding this, but not sure how this all applies to my QT.
    Thanks!



  • What error do you get?
    In short I would re-install Qt anyway.
    And not only Qt, but all the chain if you used anything which did not come with Qt package.



  • @Scott-Krise Hi, and welcome to the Qt forum!
    First of all have a look here http://doc.qt.io/qt-5/supported-platforms.html and http://doc.qt.io/qt-5/windows-requirements.html. I guess you need to update the Windows SDK.



  • @alex_malyu Hi and thanks for the reply. Im getting "g++ has stopped working in windows 10". I got it immediately when windows 10 was installed.



  • @Wieland Thanks for you response. So, based on the links you sent, it appears msvc 2015 is my only option for a compiler on windows 10? Is msvc is Microsoft Visual Studio? Im hoping this is not a major change in either how I compile or in how the EXE performs for the users? Anyone have any comments on that?

    And if that is the change I need to make, can someone point me in the right direction as to what I need to do in QT to implement this change?

    Thanks,

    Scott


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What version of MinGW are you using ?



  • @Scott-Krise said:

    it appears msvc 2015 is my only option for a compiler on windows 10?

    No. It is just the only option that is officially supported by The Qt Company. You can still use MinGW.

    The following works for me on Windows 10 Pro 64-bit:

    • Install Visual Studio 2015 Community Edition, including C++ support and the Windows SDKs for the desired targets
    • Use Qt online installer to install...
    1. Qt 5.6 prebuilt components for MinGW 4.9.2 32 bit
    2. Qt 5.6 prebuilt components for msvc2015 64 bit
    3. Desired Qt modules: Qt Canvas 3D, Qt Location, etc
    4. Qt Creator 3.6.1
    5. MinGW-builds 4.9.2 32 bit toolchain

    This setup gives me two kits in Qt Creator, msvc and MinGW.



  • Hi @Wieland ,

    Could you please elaborate on this (not related directly to the first question).
    I tried to install several version of "Visual Studio 15" on my Windows 10 PC. The latest version I tried to use it "Visual Studio Community 2015 32-bit (French) - DreamSpark". Which version of MSVC should I download ? Is there a 64-bit version as well ?

    The following works for me on Windows 10 Pro 64-bit:

    • Install Visual Studio 2015 Community Edition, including C++ support and the Windows SDKs for the desired targets
    1. Qt 5.6 prebuilt components for msvc2015 64 bit

    I do not want to use MinGW any more. I hope I will not have problems with the toolchain. Any experience with Windows10 Qt 5.6 and MSVC 15 ?



  • @metch Hi, and welcome! I downloaded Visual Studio 2015 Community from https://www.visualstudio.com/. If you see the website in French then the online installer you'll get will also be in French. If you prefer a different language then just scroll down on the website and switch to that other language before you download the online installer. Like I already said my host is 64 bit and the online installer also gave me 64 bit version of Visual Studio. I just installed Windows 10 on that machine so there were no older Visual Studio components or Windows SDKs present.



  • @SGaist Not sure how to tell what version of MinGW I am running. I am running QT 4.4.3.



  • @Wieland Hi. So I guess I'm still not quite sure what to do to resolve my issue, given I'm on QT 4.4.3. is the G++ a part of MinGW? That's the only issue I'm having at the moment. I'm trying to update to the newest version of MinGW hoping that will solve my issue. Any other thoughts given my particular setup?


  • Lifetime Qt Champion

    @Scott-Krise
    Hi yes g++ is part of the mingw setup.
    It seems that it has issue on win10.

    4.4.3 is kinda old. do you need to stay on this version ? (really need)

    If you update the mingw installation, i think u might need to compile a version of Qt with that newer mingw version as else there might be other issues. Not 100% sure there will but good to keep in note.

    I use mingw and qt 5.5 and 5.6 with windows 10 with no issues.

    Also: i assume u did try to reinstall just to rule out that is not just yet another upgrade bug.



  • @Scott-Krise said:

    @SGaist Not sure how to tell what version of MinGW I am running. I am running QT 4.4.3.

    Type g++ --version in a console.



  • BTW: AFAIK you cannot simply replace your old MinGW with a newer one. If you do so you'll also have to rebuild your Qt libraries with the new toolchain. I think that's because otherwise you'll break binary compatibility.



  • @mrjj Ya, I hear you. I know its an older version, but the decision isn't mine at the moment. Ill see if I can move in that direction.


  • Lifetime Qt Champion

    If you can't go with Qt 5, try at least Qt 4.8.7


Log in to reply