Getting error when using the provided example in "WebAssembly.instantiate()"
sudhanshug16 opened this issue · comments
Sudhanshu Gautam commented
Mingyue Li commented
I got the same error,too.
Mingyue Li commented
I tried to plug the example in my project but got the following error:
my c file:
#include <emscripten.h> extern "C" { EMSCRIPTEN_KEEPALIVE float add(float a, float b) { return a + b; } }
my js file:
wasm.init().then(function(mod) { console.log(mod.exports.add(2, 3)); });
Did you solve the problem?help!! 😄
Sudhanshu Gautam commented
No. Actually i couldn't solve the problem
Michael Skorokhodov commented
Hey, found a way to fix it, just run your webpack with -p flag, have no idea why but it works...
Mário Rodrigues commented
@mskorokhodov I confirm your fix works.