You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I compiled according to your method. Compile command:
emcc -o ./dist/appWASM.js ./dev/cpp/emscripten.cpp -O3 -s ALLOW_MEMORY_GROWTH=1 -s USE_WEBGL2=1 -s FULL_ES3=1 -s WASM=1 -s NO_EXIT_RUNTIME=1 -std=c ++1z -s EXPORTED_RUNTIME_METHODS="['ccall','stringToUTF8']" -s ASSERTIONS=1 -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0
But when running your demo, the following error is reported:
Uncaught TypeError: Module._free is not a function
at ccallArrays (wasm-arrays.js:1:975)
at HTMLButtonElement. ((index):64:13)
May I ask what is the reason?
Thanks a lot for your reply!
The text was updated successfully, but these errors were encountered:
Hey. It's possible that some things may have changed with the way things are compiled, in WebAssembly. This was (I think) quite early on, and I have moved on to other things since, so I'm unsure I'm afraid. You might need a different compile command now.
Hi DanRuta! Thank you very much for your reply.
I added the -s EXPORTED_FUNCTIONS="['_free', '_main']" parameter when compiling. There are no errors when running.
Hello
I compiled according to your method. Compile command:
emcc -o ./dist/appWASM.js ./dev/cpp/emscripten.cpp -O3 -s ALLOW_MEMORY_GROWTH=1 -s USE_WEBGL2=1 -s FULL_ES3=1 -s WASM=1 -s NO_EXIT_RUNTIME=1 -std=c ++1z -s EXPORTED_RUNTIME_METHODS="['ccall','stringToUTF8']" -s ASSERTIONS=1 -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0
But when running your demo, the following error is reported:
Uncaught TypeError: Module._free is not a function
at ccallArrays (wasm-arrays.js:1:975)
at HTMLButtonElement. ((index):64:13)
May I ask what is the reason?
Thanks a lot for your reply!
![截屏2022-05-28 下午6 28 05](https://user-images.githubusercontent.com/36149358/170821438-aae54f79-4f93-4a44-8a4a-f89f46891a02.png)
The text was updated successfully, but these errors were encountered: