Errors when creating project, several files not being found and can't build my project.
So, yesterday I decided to get rid of my Visual Studio Community 2015 version on my HDD, and instead get Visual Studio 2017 on my SSD.
After I did that I hopped into QTCreator and loaded up my project to do some work on it, but when attempting to build it failed with several errors.
I assume this is because the path to basically everything in the kits are now wrong since I no longer have vs2015 installed.
So, I decided to reinstall QTCreator hoping that it would detect my vs2017 installation, but it did not.
And now I have been trying to make the thing work for the past 4 hours with 0 progress.
How on earth do I make QT use my vs2017 when building? o.O
@The-Shroom First of all: you should switch to newer Visual Studio version when it is officially supported by Qt - this way you avoid such problems. Or are you in hurry?
Now, check your Kit: do you have any warnings/errors there? Did you check the paths (especially compiler)? As far as I know Qt VS2015 should already work with VS2017, but probably you have to fix your Kit manually.
Also: did you install C++ tools when you installed VS2017?
In the past newer VS versions did not work with older Qt versions like: VS2015 + Qt for VS2013 = does not work. But with VS2017 it should work for the first time (if you have Qt for VS2015).
In the "Auto-detected" section of Kits, there are 4 different lines :
- Desktop Qt 5.6.2 MSVC2015 64bit
- Desktop Qt 5.7.1 MSVC2017_64bit (default)
- Desktop Qt 5.9.0 MSVC2015_64bit
All of them have a red error sign to the left saying they have no compiler set, and a warning which says that no debugger is set.
If it's auto-detected I'm very confused to why it detects visual studio installations I do not have.
But now I decided to install the MSVC2015 compiler, but I get a error sign next to the kit saying that the compiler cannot produce code for Qt.
I have no idea if the kit is even st up correctly, but here is what the kit looks like :
And this is what the compiler which that kit is using looks like :
@The-Shroom The selected compiler in the last picture is configured for ARM not x86_64! Change it to x86_64.
@jsulm Oh, fixed that no more errors in the kits section however I still get errors when attempting to build my project :
Error while building/deploying project MushroomInjector (kit: Desktop Qt 5.8.0 MSVC2017_64bit) When executing step "qmake"
Seems like my project is still trying to compile in the old kit for some reason even though I selected the new one as default?
Do I need to change it in the project as well somehow?
@The-Shroom You should cleanup, run qmake and rebuild
@jsulm Attempting to "Clean All" makes an issue appear in the Issues tab :
:-1: error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.
But I'm pretty sure I have set it up :
Or am I doing something else wrong? :o
@The-Shroom Which kit are you using?
@jsulm I assumed setting it as default would set it to all my projects? If not how do I change it?
@The-Shroom On the left side click on Projects and select the kit
@jsulm So, I disabled all other kits except the one that I want, however I still get errors when building and cleaning.
When cleaning I get this error :
15:14:56: Running steps for project MushroomInjector... 15:14:56: Starting: "D:\Program (x86)\Microsoft Visual Studio 12.0\VC\bin\bscmake.exe" clean Microsoft (R) Browse Information Maintenance Utility Version 12.00.21005 Copyright (C) Microsoft Corporation. All rights reserved. BSCMAKE: error BK1506 : cannot open file 'clean': No such file or directory 15:14:56: The process "D:\Program (x86)\Microsoft Visual Studio 12.0\VC\bin\bscmake.exe" exited with code 4. 15:14:56: Elapsed time: 00:00.
And when building I get this error :
15:15:33: Running steps for project MushroomInjector... 15:15:33: Starting: "C:\Qt\5.9\msvc2015_64\bin\qmake.exe" C:\Users\Alex\Desktop\MushroomInjector\MushroomInjector.pro "CONFIG+=debug" "CONFIG+=qml_debug" 15:15:34: The process "C:\Qt\5.9\msvc2015_64\bin\qmake.exe" exited normally. 15:15:34: Starting: "D:\Program (x86)\Microsoft Visual Studio 12.0\VC\bin\bscmake.exe" qmake_all Microsoft (R) Browse Information Maintenance Utility Version 12.00.21005 Copyright (C) Microsoft Corporation. All rights reserved. BSCMAKE: error BK1506 : cannot open file 'qmake_all': No such file or directory 15:15:34: The process "D:\Program (x86)\Microsoft Visual Studio 12.0\VC\bin\bscmake.exe" exited with code 4. Error while building/deploying project MushroomInjector (kit: Desktop Qt 5.9.0 MSVC2015) The kit Desktop Qt 5.9.0 MSVC2015 has configuration issues which might be the root cause for this problem. When executing step "qmake" 15:15:34: Elapsed time: 00:00.
The project tab looks like this :
@The-Shroom I never used bscmake.exe, I only use nmake.exe as make. Did you try with nmake.exe?
Please delete the build directory after changing kit and run qmake.