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. Using qmake subprojects with WebAssembly
Qt 6.11 is out! See what's new in the release blog

Using qmake subprojects with WebAssembly

Scheduled Pinned Locked Moved Unsolved Qt for WebAssembly
1 Posts 1 Posters 504 Views
  • 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.
  • R Offline
    R Offline
    realwernerrammer
    wrote on last edited by
    #1

    Hi,
    I am trying to compile an existing program to Wasm. The code consists of a main executable and some "plugins" which are built using the "subdirs" template.
    For "normal" targets (Linux, Windows) I include the "plugins" in the .pro file of the project.

    Now for Wasm, the compiler tells me:

    error: undefined symbol: _Z27qt_static_plugin_FirePluginv (referenced by top-level compiled C/C++ code)
    warning: Link with `-sLLD_REPORT_UNDEFINED` to get more information on undefined symbols
    warning: To disable errors for undefined symbols use `-sERROR_ON_UNDEFINED_SYMBOLS=0`
    warning: __Z27qt_static_plugin_FirePluginv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
    error: undefined symbol: _Z27qt_static_plugin_WindPluginv (referenced by top-level compiled C/C++ code)
    warning: __Z27qt_static_plugin_WindPluginv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
    error: undefined symbol: _Z33qt_static_plugin_BarkBeetlePluginv (referenced by top-level compiled C/C++ code)
    warning: __Z33qt_static_plugin_BarkBeetlePluginv may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library
    Error: Aborting compilation due to previous errors
    
    

    Is there a way to include these modules also for WASM?

    This is how it looks like for windows in the .pro file:

    win32-msvc*:{
    #release msvc
    
    PRE_TARGETDEPS += ../plugins/iland_fire.lib
    PRE_TARGETDEPS += ../plugins/iland_wind.lib
    PRE_TARGETDEPS += ../plugins/iland_barkbeetle.lib
    LIBS += -L../plugins -liland_fire -liland_wind -liland_barkbeetle
    }
    }
    

    I am using Qt6.5.2, emscripten 3.1.25, Ubuntu 20.4.

    Any help is appreciated!

    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