Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Configuring Qt for WebAssembly and Emscripten
ronaldo last edited by ronaldo
I am trying to configure Emscripten with Qt for WebAssembly. However, my auto-detected
Emscripten Compileris showing an error (
This toolchain is invalid). I have already downloaded and installed Emscripten and sed.
This may be because the displayed Compiler Path is set to
\clang.exefor both C and C++ - is there a way to change this? What does it need to be changed to?
This is my WebAssembly Kit:
When I try to 'run qmake' the error returned is
Project ERROR: Cannot run target compiler 'em++'. Output: =================== =================== Maybe you forgot to setup the environment?
I am aware that you need to setup the environment for the terminal using
emsdk_env.batbut how does it work with Qt Creator?
All help appreciated.
SyntaX last edited by
dunno if you managed to resolve your problem in the meantime,
but I had a similar error (under macOS and emscripten 1.39.17):
After downloading and installing everything, I ran emsdk_env (which should generate the ~/.emscripten file in the user folder, if I remember correctly)
But it seems, that Qt Creator could not resolve the var for the defined emsdk_path
emsdk_path = os.path.dirname(os.environ.get('EM_CONFIG')).replace('\\', '/')
so I replaced all the placeholder with the explicit path:
emsdk_path = '/Users/myuser/Documents/Programming/emsdk'
I also added
COMPILER_ENGINE = NODE_JS JS_ENGINES = [NODE_JS]
at the bottom (not sure though if that was needed)
After restarting Qt creator the compiler and toolkit for WebAssembly wer successfully recognized.