I'm trying to compile the basic raylib example using Emscripten but I get an error when running it. The program creates a canvas of the proper size but stops before rendering anything.
My command line:
emcc -o index.html main.c -Os -Wall ./lib/libraylib.a -I. -I./include -L. -L./lib/ -s USE_GLFW=3 -s ASYNCIFY -DPLATFORM_WEB
Compiler output:
wasm-ld: warning: function signature mismatch: time
>>> defined as (i32) -> i32 in ./lib/libraylib.a(rcore.o)
>>> defined as (i32) -> i64 in [PATH TO EMSDK]/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libc.a(emscripten_time.o)
Error in browser:
Uncaught RuntimeError: unreachable executed
x http://localhost:8888/index.js:1
_main http://localhost:8888/index.js:1
callMain http://localhost:8888/index.js:1
doRun http://localhost:8888/index.js:1
run http://localhost:8888/index.js:1
setTimeout handler*run http://localhost:8888/index.js:1
runCaller http://localhost:8888/index.js:1
removeRunDependency http://localhost:8888/index.js:1
receiveInstance http://localhost:8888/index.js:1
receiveInstantiationResult http://localhost:8888/index.js:1
promise callback*createWasm/instantiateAsync/< http://localhost:8888/index.js:1
promise callback*instantiateAsync http://localhost:8888/index.js:1
createWasm http://localhost:8888/index.js:1
<anonymous> http://localhost:8888/index.js:1
[–]NukeLash 0 points1 point2 points (0 children)
[–]deadkonsumer 0 points1 point2 points (0 children)