Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Only Wasm Build Presents Some Errors and Requires Additional Dependencies

Only Wasm Build Presents Some Errors and Requires Additional Dependencies

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 419 Views 1 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.
  • Ahmed Yarub Hani Al NuaimiA Offline
    Ahmed Yarub Hani Al NuaimiA Offline
    Ahmed Yarub Hani Al Nuaimi
    wrote on last edited by
    #1

    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?

    jsulmJ 1 Reply Last reply
    0
    • Ahmed Yarub Hani Al NuaimiA Ahmed Yarub Hani Al Nuaimi

      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?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Ahmed-Yarub-Hani-Al-Nuaimi Isuggest to ask on Qt developers mailing list or even submit a bug in Qt bug tracker.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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