I want to test out QT WebAssembly for my scientific program. Therefore, I installed emscripten.
$em++ --version
returns
You need to copy the .emscripten file from emsdk directory to your home (/home/myUsername).
You need to fix the paths in the file manually (See example below).
Notice that .emscripten file , at least in the version (1.39.8) i am using, is a python script (maybe a bug?)
example file before edit:
import os
emsdk_path = os.path.dirname(os.environ.get('EM_CONFIG')).replace('\\', '/')
NODE_JS = emsdk_path + '/node/12.18.1_64bit/bin/node'
LLVM_ROOT = emsdk_path + '/upstream/bin'
BINARYEN_ROOT = emsdk_path + '/upstream'
EMSCRIPTEN_ROOT = emsdk_path + '/upstream/emscripten'
TEMP_DIR = emsdk_path + '/tmp'
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]
after edit:
import os
emsdk_path = os.path.dirname(os.environ.get('EM_CONFIG')).replace('\\', '/')
NODE_JS = '/home/myUsername/node/12.18.1_64bit/bin/node'
LLVM_ROOT = '/home/myUsername/upstream/bin'
BINARYEN_ROOT = '/home/myUsername/upstream'
EMSCRIPTEN_ROOT = '/home/myUsername/upstream/emscripten'
TEMP_DIR = '/home/myUsername/tmp'
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]
When above steps are completed qt creator was able to detect the Emscripten Compiler with no errors.
Have you try in the kits tab to set your compiler with this values?
Compiler: C compiler x86 64 e1.38.27_bit C++ compiler x86 64 e1.38.27_bit
Qt version: path to you qmake built with webassembly, for example webassembly binaries or your custom binaries.
Qt mkspec: wasm-emscripten
Hope this information helps, if you face any other problem let me know.