Solved Compiler cannot produce code for this version of Qt
-
Hello,
Let's explain my situation : I am using Windows 7, and I have installed Qt 5.5.1 and Microsoft Visual Studio Express 2013, in order to develop a GUI. It worked splendidly, but then I realized that I needed Qt 5.6 (at least), because I need to use the QCanBus Class. Thus I downloaded and installed Qt 5.7, and tried launching the GUI I made previously, but it did not work. I found out that the errors came from the kit I was using, which had no compiler :
So I manually created a kit :
But I get the following error:
According to the supported configurations page, Visual Express 2013 and Qt should be compatible (and it was with Qt 5.5.1), but it does not work for me. Has anyone come across the same issue?
Thanks for your help.Nicolas G.
-
Where is the error message?
-
In the kit tab, when i put the mouse on the red "!".
When i try to compile my code, i get (translated from French on the fly) :
qtmaind.lib(qtmain_win.obj):-1: erreur : LNK2038: discordance detected for '_MSC_VER' : the value '1900' does not match '1800' in main.obj -
Error message pretty clearly states that your compiler cannot produce code for Qt version you have downloaded. You have to use Qt libraries compiled with same msvc version.
-
It seems you installed the Qt binaries for Visual Studio 2015, but you are running Visual Studio 2013.
From wikipedia:
MSVC++ 12.0 _MSC_VER == 1800 (Visual Studio 2013)
MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015) -
Ah right ok. I might have been looking for something too complicated.
Anyway I installed the proper binaries and it worked, thanks to you both.