Qt 6.4 - QWebSocket undefined symbol on macOS
-
wrote on 17 Nov 2022, 09:49 last edited by Marcin22
I am trying to compile an application using WebAssembly on macOS 13. Unfortunately, the compiler fails on QWebSocket class, returning the below error:
wasm-ld: error: (path): undefined symbol: QWebSocket::staticMetaObject
em++: error: '(...)/emsdk/upstream/bin/wasm-ld @/var/folders/qn/gzn_l03x2ds1cdh94cysrhfw0000gq/T/emscripten_w4yw7w3n.rsp.utf-8' failed (returned 1)
make[1]: *** [ui.js] Error 1
make: *** [sub-ui-make_first] Error 2
Error while building/deploying project hmi-solution (kit: WebAssembly Qt 6.4.0)Here's the output of the em++ --version:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.14 (4343cbec72b7db283ea3bda1adc6cb1811ae9a73)I am unable to find any hints on the problem, but it looks like emscripten is failing its build due to QWebSocket not being found in plugins. I checked in the wasm_32 directory, and it seems to include all the required packages.
[EDIT]
Just to check if I could advance any further with the compilation, I removed the WS module from my application and received the error described in the following topic:
https://forum.qt.io/topic/137358/webassemby-project-bild-error/6The Qt modules I am trying to use - quick, qml, svg, quickcontrols2, widgets, and network (Besides websockets, which I removed due to the previous compilation error). All of the above are listed as supported for WebAssembly builds in Qt 6.4 - https://doc.qt.io/qt-6/wasm.html#developing-with-qt-for-webassembly
1/1