MSVC 2015 compiler not recognized for Qt 5.6.0



  • Hi
    I have recently installed Visual Studio 2015 and want to start using it with Qt 5.6.0 in place of VS 2013.
    Qt Creator finds the 2015 MSVC compilers and shows them in the Compilers tab correctly.
    The Qt Versions tab shows Qt 5.6.0 for MSVC 2015 as auto detected but with the error message "No compiler can produce code for this Qt version. Please define one or more compilers."
    The Qt 5.6.0 for MSVC 2013 version however is fine and works without any problem.

    I found this thread which mentions the same issue at the end but no response to that specific problem.
    Re: Qt 5.6.0 Installing Problem

    Does anyone have any idea what might be causing this?
    Thanks.





  • This may be the same issue reported here: http://forum.qt.io/topic/67080/qt-creator-and-ms-c-build-tools/2



  • MSVC 14.0 (2015) compiler installation is a bit odd comparing to older versions. I recently installed it with a bunch of unnecessary bloat (around 14GB). I had to install Visual Studio Community Edition 2015 and then activate the C++ compiler with trying to create a C++ project (which triggers another 6GB install on the older 8GB). This is the new way express (free) editions work. I don't know whether the Win SDK installs MSVC2015 properly or not.

    Hope this helps.



  • @Ratzz
    Thanks.
    I tried that and selected what I think is the correct compiler (i.e. compiler "Microsoft Visual C++ Compiler 14.0 (x86)" and Qt version "Qt 5.6.0 MSVC2015 32bit") but the manually created kit still has the error "cannot produce code for the Qt version".



  • @synasius
    Thanks. Not really the same though. Qt Creator does detect the compiler, but it says that it is not the correct compiler for Qt 5.6.0 MSVC2015.



  • I already had Visual Studio Community Edition 2015 installed and have built C++ projects with it so this is also not the problem.

    I have however managed to get it to work by creating a kit manually as Ratzz suggested above, but had to specifically set the mkspec used by the kit as well rather than let it use the default one for the compiler. It seems that Qt Creator thinks that the Microsoft Visual C++ Compiler 14.0 is actually the VC2005 compiler and therefore tries to use the appropriate 2005 mkspec. Even with the mkspec set the kit still shows up as having an error but seems to work.


Log in to reply
 

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