Unable to use any emscripten.h function which is defined in javascript in a statically linked library

22 views
Skip to first unread message

Mibi88

unread,
Apr 12, 2025, 4:45:59 PMApr 12
to emscripten-discuss
When trying to define a function with EM_JS or trying to use emscripten_run_script I'm getting

wasm streaming compile failed: LinkError: import object field 'emscripten_run_script' is not a Function

I tried adding -Wl,--whole-archive or -Wl,-u,emscripten_run_script. I also tried -sEXPORTED_RUNTIME_METHODS=[\"emscripten_run_script\"], I'm always getting the same error.

Any help is welcome!
Mibi88

Mibi88

unread,
Apr 13, 2025, 10:48:23 AMApr 13
to emscripten-discuss

I fixed it: I was compiling to a build/index file and I still had an old JS glue code file so I didn't noticed that I wasn't compiling to JS. I finally got it working!

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/emscripten-discuss/0fc6e6cd-bcf4-459d-9061-f20543e06648n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages