Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. how can i setup visual studio compiler for MSVC2017
QtWS25 Last Chance

how can i setup visual studio compiler for MSVC2017

Scheduled Pinned Locked Moved Solved QtWebEngine
3 Posts 2 Posters 4.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anmol
    wrote on 26 May 2019, 08:29 last edited by
    #1

    0_1558839160353_Screenshot (28).png

    i want to use webengine but i don't know how to setup compiler for it. i have install visual studio 2019 for c++.

    0_1558839265629_Screenshot (29).png

    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.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 26 May 2019, 11:09 last edited by Chris Kawa
      #2

      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" postfix

      On 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:
      webengine selected in installer

      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.

      1 Reply Last reply
      3
      • A Offline
        A Offline
        Anmol
        wrote on 26 May 2019, 12:42 last edited by
        #3

        0_1558873904982_Screenshot (32).png
        0_1558873961423_Screenshot (33).png

        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 .

        0_1558874357724_Screenshot (34).png

        project is now running perfectly by using MSVC2017 32bit .

        thanks for your help .

        1 Reply Last reply
        0

        1/3

        26 May 2019, 08:29

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved