问题
I was able to build my Qt projects with Qt Creator 4.0.1 (Qt 5.6.2 MSVC2015 32bit) without any problem until it (suddenly) stopped compiling. In the last picture when I assign Qt5.6.2 to msvc14 it says incompatible ABI (2005 vs 2015) which is strange as Visual Studio 2015 is compiler 14.
Not sure what other info I should provide. Thank you.
回答1:
I deleted content of the "c:\Users\user\AppData\Roaming\QtProject" folder and now Qt Creator seems to be happy again. Some file(s) must have been corrupted. Impressive.
EDIT 1
I found out that I "accidentally" lunched older version of the Qt Creator 2.7.0 which changed files in "c:\Users\user\AppData\Roaming\QtProject" folder. File toolchains.xml was particularly important as that is where (when using Qt Creator 4.0.1 again) ABI confusion came from.
QtCreator 4.0.1 assigns ABI 2015 to MSVC 14.0 in toolchains.xml file
<value type="QString" key="ProjectExplorer.MsvcToolChain.SupportedAbi">x86-windows-msvc2015-pe-32bit</value>
<value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBat">C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat</value>
whereas QtCreator 2.7.0 assigns ABI 2005 to MSVC 14.0 in toolchains.xml file (which is wrong)
<value type="QString" key="ProjectExplorer.MsvcToolChain.SupportedAbi">x86-windows-msvc2005-pe-32bit</value>
<value type="QString" key="ProjectExplorer.MsvcToolChain.VarsBat">C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat</value>
Qt Creator 4.0.1 was/is not able to fix this and therefore deleting content of the folder gives Qt Creator 4.0.1 chance to go from zero to hero, so to speak.
来源:https://stackoverflow.com/questions/49036136/qt-creator-4-0-1-qt-5-6-2-msvc2015-32bit-stopped-accepting-toolchains-compiler