System cannot find specified file when building Web Assembly project in Qt
-
@Gilboonet MingW64 is set when running the app on desktop, however, it appears it defaulted to mingw32 for my wasm build, as shown in the set location for make under "Build Steps" in the Projects panel:
Make: mingw32-make.exe -j16 in C:\EFMM\a8-edu-app-atlantic-spigot-main\EscapeFromMorseMansion\build\WebAssembly_Qt_6_8_1_single_threaded-Debug
-
@Ledge You can take a look at your kit configuration and see if it is as the doc states. There are those notes :
On Windows, make sure you have Mingw-w64 in your PATH and configure with the following: configure -qt-host-path C:\Path\to\Qt -no-warnings-are-errors -platform wasm-emscripten -prefix %CD%\qtbase
Note: When using vanilla CMake (as opposed to qt-cmake on Linux or qt-cmake.bat on Windows) remember to specify a toolchain file with "-DCMAKE_TOOLCHAIN_FILE", as for any other cross-platform build. For details see here: Getting started with CMake.
-
@Gilboonet I followed those steps you mentioned, requiring me to build the app on the command line and scrap what I was doing in the GUI. Now this command below to build from the command line has led to me to this error, which makes me believe I need to build from source since my qt maintenance tool already says I have multimedia downloaded. Any idea of how to resolve this error or am I following the wrong path? Do I need to change variable values to set QT6 to be found? Thank you for your time.
Command:
/c/Qt/6.8.1/wasm_singlethread/bin/qt-cmake.bat . -DQT_CHAINLOAD_TOOLCHAIN_FILE= /c/Qt/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
Error:
CMake Error at CMakeLists.txt:212 (find_package):
Found package configuration file:C:/Qt/6.8.1/wasm_singlethread/lib/cmake/Qt6/Qt6Config.cmake
but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
FOUND. Reason given by package:Failed to find required Qt component "Multimedia".
Expected Config file at
"C:/Qt/6.8.1/wasm_singlethread/lib/cmake/Qt6Multimedia/Qt6MultimediaConfig.cmake"
exists -
@Gilboonet multimedia is not officially supported, but it is available for WebAssembly.
-
@lorn-potter Thank you, I think the OP needs help from someone who already built a Wasm project with Multimedia as he didn't manage to have his project built, on the pinned discussion almost all links are dead or out of date which doesn't help much.