Solved Unable to Build any program in Windows 10 with Qt Creator 5.12.3
-
Hi, I have been running into a recurring error continuously for the last few days when i'm trying to compile a program in my Windows 10 machine. The program was originally written in Linux using Qt 5.10 and GCC and in Linux it worked perfectly for years. Now when i'm trying to compile it in my windows machine its giving me an error saying that MSVC2017 32 Bit has configuration issues.
Qt Creator 4.9.1 Based on Qt 5.12.3 (MSVC 2017, 32 bit) Built on May 26 2019 21:17:08 From revision 168e91b618 Copyright 2008-2019 The Qt Company Ltd. All rights reserved.
Here is the error that is making my life hell as i just can't compile any program in Windows. As i'm a linux only developer so this is the first time i'm seeing such errors as i'm trying to compile it on Windows 10.
20:40:28: The process "C:\Qt\Qt5.12.4\Tools\mingw730_32\bin\mingw32-make.exe" exited with code 2. Error while building/deploying project webenginebrowser (kit: Desktop Qt 5.12.4 MSVC2017 32bit) The kit Desktop Qt 5.12.4 MSVC2017 32bit has configuration issues which might be the root cause for this problem. When executing step "Make"
When installing Qt in Windows i've selected the Full package everything that comes under the 5.12.3 tree. Mingw Qt version, clang all are installed.
I've also installed Visual Studio 2017 with C++ tools and every assorted libraries.
I've also ran vcvarshall.bat and opened Qt creator from that terminal but still the same error is coming up and i have no idea left on how to tackle this. I've literally been trying out each solution given by google still the same error.
Please give some solution on how to get my programs compiled in Qt 5.12 in Windows.
-
When installing Qt in Windows i've selected the Full package everything that comes under the 5.12.3 tree. Mingw Qt version, clang all are installed.
That has been a problem for others before.
I'd recommend to install only the minimum needed versions, so either MSVC or MinGW. Both have advanteges and disadvanteges, so the correct choice depends on what you want to do.
Which Qt modules do you intend to use?
-
A number of different modules from the whole Qt world have been in use in my projects. These are the ones i'm using
core gui widgets sql network webenginewidgets printsupport
When installing Qt in Windows i actually selected everything thats coming under 5.12.3 branch.
Also for reference the OS is
Windows 10 Enterprise 64-bit on a intel i5 laptop with 4GB RAM
Funny thing i have never before experienced such an error when developing in Qt C++ under Linux and i have been doing so for the last 4 years now. But now when i need to run a project in Windows i'm unable to compile anything and that is just super frustrating.
-
Ok, the following thread https://www.qtcentre.org/threads/70203-Is-MSVC-compiler-really-required-to-use-QWebEngineView says, you need MSVC for WebEngine (no Qt problem, though).
So I'd recommend you to uninstall all Qt and only install one Qt for MSVC version fitting your MSVC compiler. (Which version is it?)
This must then be auto-detected by QtCreator. Running vcvars.bat externally does not work.
Regards
-
I haven't installed MinGW separately as its already packed with the Qt installation. But i installed Visual Studio 2017 separately in order to fix the issue but that didn't help.
-
@aha_1980 said in Unable to Build any program in Windows 10 with Qt Creator 5.12.3:
So I'd recommend you to uninstall all Qt and only install one Qt for MSVC version fitting your MSVC compiler. (Which version is it?)
MSVC 2017
Ok will try as you suggested.
-
Hi,
From the looks of it, you are trying to build an application with Qt for MSVC2017 using the MinGW compiler. That won't work, you have to either use the MinGW Qt versions for that or install Visual Studio to use the Visual Studio build of Qt. Note that this is nothing Qt specific, it's a compiler compatibility issue.
-
Ok. Finally after trying out all the suggestions i found out that the problem was the messing up of too many libraries in the test machine where i was building the Qt program.
I had to take explicit permission to remove everything and install a fresh Windows 10. After that i only selected the MinGW in the kit and it finally compiled properly.