Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. Can I use MSVC compiler instead of MinGW for Webassembly?
Forum Updated to NodeBB v4.3 + New Features

Can I use MSVC compiler instead of MinGW for Webassembly?

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
7 Posts 4 Posters 1.0k Views 2 Watching
  • 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.
  • P Offline
    P Offline
    Pradson
    wrote on 9 Jul 2022, 19:54 last edited by
    #1

    Hello,

    Does the latest versions Qt (Qt 6 and above) support MSVC complier as well apart from MinGW for Qt Webassembly?

    Currently, I am using Qt 5.12.3 and MSVC2017 compiler for our product. I want to move our product into web as well but I want to use MSVC compiler only for our development. I do not want to use MinGW compiler.

    Is there any option in latest releases so that I could go ahead with Qt and MSVC compiler for Qt Webassesbly ? Kindly suggest asap.

    Thanks & Regards,
    Pradson

    J 1 Reply Last reply 10 Jul 2022, 02:42
    0
    • P Pradson
      9 Jul 2022, 19:54

      Hello,

      Does the latest versions Qt (Qt 6 and above) support MSVC complier as well apart from MinGW for Qt Webassembly?

      Currently, I am using Qt 5.12.3 and MSVC2017 compiler for our product. I want to move our product into web as well but I want to use MSVC compiler only for our development. I do not want to use MinGW compiler.

      Is there any option in latest releases so that I could go ahead with Qt and MSVC compiler for Qt Webassesbly ? Kindly suggest asap.

      Thanks & Regards,
      Pradson

      J Offline
      J Offline
      JKSH
      Moderators
      wrote on 10 Jul 2022, 02:42 last edited by
      #2

      @Pradson said in Can I use MSVC compiler instead of MinGW for Webassembly?:

      Does the latest versions Qt (Qt 6 and above) support MSVC complier as well apart from MinGW for Qt Webassembly?

      Qt for WebAssembly does not use MSVC OR MinGW. Instead, you need the emscripten compiler: https://doc.qt.io/qt-6/wasm.html#installing-emscripten

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      P 1 Reply Last reply 10 Jul 2022, 07:58
      2
      • J JKSH
        10 Jul 2022, 02:42

        @Pradson said in Can I use MSVC compiler instead of MinGW for Webassembly?:

        Does the latest versions Qt (Qt 6 and above) support MSVC complier as well apart from MinGW for Qt Webassembly?

        Qt for WebAssembly does not use MSVC OR MinGW. Instead, you need the emscripten compiler: https://doc.qt.io/qt-6/wasm.html#installing-emscripten

        P Offline
        P Offline
        Pradson
        wrote on 10 Jul 2022, 07:58 last edited by
        #3

        @JKSH

        Thanks for the reply.

        Kindly check the below motioned information into the the link that you have provided. It seems the MinGW is required for the webassembly. Kindly check and suggest.

        "On Windows, make sure you have MinGW in your PATH and configure with the following:"

        Thanks & Regards,
        Pradson

        J 1 Reply Last reply 10 Jul 2022, 08:12
        0
        • P Pradson
          10 Jul 2022, 07:58

          @JKSH

          Thanks for the reply.

          Kindly check the below motioned information into the the link that you have provided. It seems the MinGW is required for the webassembly. Kindly check and suggest.

          "On Windows, make sure you have MinGW in your PATH and configure with the following:"

          Thanks & Regards,
          Pradson

          J Offline
          J Offline
          JonB
          wrote on 10 Jul 2022, 08:12 last edited by
          #4

          @Pradson
          The reference to MinGW is in the section Building Qt from Source. Since it states above that binary builds are available for platforms, why are you wanting to build it?

          P 1 Reply Last reply 10 Jul 2022, 17:51
          0
          • L Offline
            L Offline
            lorn.potter
            wrote on 10 Jul 2022, 09:01 last edited by lorn.potter 7 Oct 2022, 09:03
            #5

            The requirement for mingw on windows was because Emscripten needed mingw-make to build, and is still needed for Qt 5, as Emscripten does not understand nmake, which is related to argument switches that nmake uses.

            The documentation needs to be updated for Qt 6.

            If you using Qt 6, the msvc Qt binaries can be used for the host build if you have ninja. Ninja can be used for building both Qt itself and apps. Specifying -cmake-use-default-generator when building Qt and trying to use (msvc) nmake will not work.

            Ninja can create proper makefiles, otherwise mingw-make will be needed.

            Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
            Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

            P 1 Reply Last reply 10 Jul 2022, 18:07
            3
            • J JonB
              10 Jul 2022, 08:12

              @Pradson
              The reference to MinGW is in the section Building Qt from Source. Since it states above that binary builds are available for platforms, why are you wanting to build it?

              P Offline
              P Offline
              Pradson
              wrote on 10 Jul 2022, 17:51 last edited by
              #6

              @JonB

              Thanks for reply.
              I think MinGW is require for emscripten. So, can I replace MinGW with MSVC for Qt webassembly?

              Thanks,
              Pradson

              1 Reply Last reply
              0
              • L lorn.potter
                10 Jul 2022, 09:01

                The requirement for mingw on windows was because Emscripten needed mingw-make to build, and is still needed for Qt 5, as Emscripten does not understand nmake, which is related to argument switches that nmake uses.

                The documentation needs to be updated for Qt 6.

                If you using Qt 6, the msvc Qt binaries can be used for the host build if you have ninja. Ninja can be used for building both Qt itself and apps. Specifying -cmake-use-default-generator when building Qt and trying to use (msvc) nmake will not work.

                Ninja can create proper makefiles, otherwise mingw-make will be needed.

                P Offline
                P Offline
                Pradson
                wrote on 10 Jul 2022, 18:07 last edited by
                #7

                @lorn-potter

                Hi, thanks a lot for sharing me detailed description.

                Currently, I am using Qt 5.12.3 and MSVC2017 for our product. If I migrated entire code from Qt 5.12.3 and MSVC2017 to Qt 6 and MSVC2019 then, could I replace MinGW with MSVC 2019 for web assembly related development? If yes, please share the steps for the same and if not, then suggest any other options.

                If I am in wrong path, then please suggest how shall I approach for our solution as well?

                Thanks,
                Pradson

                1 Reply Last reply
                0

                1/7

                9 Jul 2022, 19:54

                • Login

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