how can i setup visual studio compiler for MSVC2017
-
i want to use webengine but i don't know how to setup compiler for it. i have install visual studio 2019 for c++.
these are autodetecte compilers. i have try each compiler one bye one ether it say - : Unknown module(s) in QT: webenginewidgets
or says : Qt5WebEngineWidgetsd.lib(Qt5WebEngineWidgetsd.dll):-1: error: LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
please help me.
-
First of all lets clarify some compiler versions and bitness, because you're mixing them up.
Compiler versions:
Visual Studio 2015 is "Microsoft Visual C++ Compiler 14.0x"
Visual Studio 2017 is "Microsoft Visual C++ Compiler 14.1x" - you don't seem to have that installed
Visual Studio 2019 is "Microsoft Visual C++ Compiler 16.x"Please clarify which you want to use because the picture shows you've got Qt for VS2017, you said you installed VS2019 and the picture shows you selecting compiler from VS2015.
Second thing is the bitness:
32 bit is compiler with "x86" postfix
64 bit is compiler with "amd64" postfixOn to the errors:
Unknown module(s) in QT: webenginewidgets
- this means you don't have QtWebEngine module installed. It's a separate install and is not included by default. If you installed Qt via online installer run it again and make sure you have the appropriate checkbox selected:
error: LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
- the picture shows you're using the 32 bit kit but you've set it up with the 64 bit compiler. Go to kits tab and set it like this:
For "Desktop Qt 5.12.3 MSVC2017 32bit" kit set its compiler to "Microsoft Visual C++ Compiler 16.2.28917.182 (x86)"
For "Desktop Qt 5.12.3 MSVC2017 64bit" kit set its compiler to "Microsoft Visual C++ Compiler 16.2.28917.182 (amd64)"These set the VS2019 compiler for VS2017 Qt, but VS2017 and VS2019 are binary compatible so it should be ok.
Last thing is pay attention which kit you're actually compiling. From the pictures you posted you're building with the 32 bit kit. If I remember correctly QtWebEngine is not supported for 32bit (I might be wrong on that, it's been a while since I used it) so make sure you switch to the 64 bit kit.
-
these are the compiler i have installed
i have set compiler in kit as you said "Desktop Qt 5.12.3 MSVC2017 64bit" kit set its compiler to "Microsoft Visual C++ Compiler 16.2.28917.182 (amd64)" but it did not work and gave following error
error: LNK1112: module machine type 'x64' conflicts with target machine type 'x86'But "Desktop Qt 5.12.3 MSVC2017 32bit" kit set its compiler to "Microsoft Visual C++ Compiler 16.2.28917.182 (x86)" worked perfectly .
project is now running perfectly by using MSVC2017 32bit .
thanks for your help .