Description
for using EMSCRIPTEN_FETCH_SYNCHRONOUS in all thread, the documentation (https://emscripten.org/docs/api_reference/fetch.html) say to use in --proxy-to-worker + -s USE_PTHREADS
but when I use them, I get the following compiler error:
"--proxy-to-worker is not supported with -s USE_PTHREADS>0! Use the option -s PROXY_TO_PTHREAD=1 if you want to run the main thread of a multithreaded application in a web worker."
if I use additional flag -s PROXY_TO_PTHREAD=1 insteadof USE_PTHREADS
I get the following error :
"-s PROXY_TO_PTHREAD=1 requires -s USE_PTHREADS to work!"
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.4 (14cd48e)
clang version 15.0.0 (https://github.com/llvm/llvm-project ce5588fdf478b6af724977c11a405685cebc3d26)
Target: wasm32-unknown-emscripten
Thread model: posix
Full link command and output with -v
appended:
emcc.bat Emscripten/Debug/HttpNetFile.o Emscripten/Debug/IOFILE.o Emscripten/Debug/Source.o C:/inetpub/wwwroot/SG/TestEmscripten/Core.Emscripten.wasm C:/inetpub/wwwroot/SG/TestEmscripten/SimpleProject.wasm C:/Projects/simple_opengl-master/TheMainProject/libs/libxml2.a -s FETCH=1 -g --preload-file com.skyline.terraexplorer -s USE_ZLIB=1 --bind -fexceptions --proxy-to-worker -s USE_PTHREADS -O0 -o C:/inetpub/wwwroot/SG/TestEmscripten/TheMainProject.js -v
emcc: error: --proxy-to-worker is not supported with -s USE_PTHREADS>0! Use the option -s PROXY_TO_PTHREAD=1 if you want to run the main thread of a multithreaded application in a web worker.