Originally Posted by
d_stranz
It looks like your bug is caused by something in the Qt CMake scripts used to build Qt for WebAssembly. Check out
this Qt bug report post and compare with your Qt6WasmMacros.cmake file contents.
I found a Qt5WasmMacros.cmake in the folder wasm_32/lib/cmake/Qt6Core, here it is :
# Copy in Qt HTML/JS launch files for apps.
function(_qt_internal_wasm_add_target_helpers target)
/----- (some stuff here) -----/
function(_qt_internal_add_wasm_extra_exported_methods target)
get_target_property(wasm_extra_exported_methods "${target}" QT_WASM_EXTRA_EXPORTED_METHODS)
if(NOT wasm_extra_exported_methods)
set(wasm_extra_exported_methods ${QT_WASM_EXTRA_EXPORTED_METHODS})
endif()
if(wasm_extra_exported_methods)
target_link_options("${target}" PRIVATE
"SHELL:-s EXPORTED_RUNTIME_METHODS=UTF16ToString,stringToUTF16,${wasm_extra_exported_methods}"
)
else()
# an errant dangling comma will break this
target_link_options("${target}" PRIVATE
"SHELL:-s EXPORTED_RUNTIME_METHODS=UTF16ToString,stringToUTF16"
)
endif()
endfunction()
# Copy in Qt HTML/JS launch files for apps.
function(_qt_internal_wasm_add_target_helpers target)
/----- (some stuff here) -----/
function(_qt_internal_add_wasm_extra_exported_methods target)
get_target_property(wasm_extra_exported_methods "${target}" QT_WASM_EXTRA_EXPORTED_METHODS)
if(NOT wasm_extra_exported_methods)
set(wasm_extra_exported_methods ${QT_WASM_EXTRA_EXPORTED_METHODS})
endif()
if(wasm_extra_exported_methods)
target_link_options("${target}" PRIVATE
"SHELL:-s EXPORTED_RUNTIME_METHODS=UTF16ToString,stringToUTF16,${wasm_extra_exported_methods}"
)
else()
# an errant dangling comma will break this
target_link_options("${target}" PRIVATE
"SHELL:-s EXPORTED_RUNTIME_METHODS=UTF16ToString,stringToUTF16"
)
endif()
endfunction()
To copy to clipboard, switch view to plain text mode
I don't know if it get used by make, by the compiler or not, or at which state. I usually use cmake but I simply try to understand the basics of it until it works.
Am I supposed to copy this file to "HTML/JS Launch file (??)" or is that what this file do ?
(that's true for .dll, I'll have a look later at why it links them instead of lnking libs.)
Bookmarks