Unsolved Only Wasm Build Presents Some Errors and Requires Additional Dependencies
-
I have a minimalist Qt application built with CMake. I'm trying to reach the ideal configuration. Currently it works on Windows, Android, iOS, and Wasm with very similar config. There are a couple of problems that happen only in Wasm:
1- I do know for a fact that currently Emscripten only supports static linking (although there might be some hacky ways to use shared libraries, but let's not get into that). This would generate the following warnings which I don't think affect the final result:CMake Warning (dev) at C:/Qt/5.15.2/wasm_32/lib/cmake/Qt5Gui/Qt5Gui_QGifPlugin.cmake:2 (add_library): ADD_LIBRARY called with MODULE option but the target platform does not support dynamic linking. Building a STATIC library instead. This may lead to problems. Call Stack (most recent call first): C:/Qt/5.15.2/wasm_32/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:393 (include) C:/Qt/5.15.2/wasm_32/lib/cmake/Qt5Quick/Qt5QuickConfig.cmake:218 (find_package) C:/Qt/5.15.2/wasm_32/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package) CMakeLists.txt:10 (find_package) This warning is for project developers. Use -Wno-dev to suppress it. . . .
As you can see, these are cause by Qt's Wasm script. Shouldn't this be fixed?
2- As you can see in the repo https://github.com/ahmedyarub/basic_qml/blob/master/CMakeLists.txt QuickControls2 is only required for Emscripten, otherwise I'd get the following when building:warning: undefined symbol: _ZN10QQuickDial10touchEventEP11QTouchEvent (referenced by top-level compiled C/C++ code) warning: undefined symbol: _ZN10QQuickDial10wheelEventEP11QWheelEvent (referenced by top-level compiled C/C++ code) . . .
Any reason for that?
-
@Ahmed-Yarub-Hani-Al-Nuaimi Isuggest to ask on Qt developers mailing list or even submit a bug in Qt bug tracker.