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

    JKSHJ 1 Reply Last reply
    0
    • P Pradson

      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

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on 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
      2
      • JKSHJ JKSH

        @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 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

        JonBJ 1 Reply Last reply
        0
        • P Pradson

          @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

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on 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
          0
          • lorn.potterL Offline
            lorn.potterL Offline
            lorn.potter
            wrote on last edited by lorn.potter
            #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
            3
            • JonBJ JonB

              @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 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
              • lorn.potterL lorn.potter

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

                • Login

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