Can I use MSVC compiler instead of MinGW for Webassembly?
-
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 -
@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
-
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 -
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.
-
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