1. I get this error when trying to load the module:
2.
3. BindingError {name: "BindingError", message: "No dynCall invoker
for signature: ii", stack: "BindingError: No dynCall invoker for
signature: ii…meCallbacks (http://localhost:8000/foo.js:1:7729)"}
4. name: "BindingError"
5. message: "No dynCall invoker for signature: ii"
6. stack: "BindingError: No dynCall invoker for signature: ii↵ at
BindingError.<anonymous> (http://localhost:8000/foo.js:1:12836)↵ at new
BindingError (eval at createNamedFunction
(http://localhost:8000/foo.js:1:12545), <anonymous>:4:34)↵ at
throwBindingError (http://localhost:8000/foo.js:1:13277)↵ at
embind__requireFunction (http://localhost:8000/foo.js:1:29330)↵ at
__embind_register_class (http://localhost:8000/foo.js:1:30314)↵ at
wasm-function[45]:0x2715↵ at wasm-function[88]:0x36a8↵ at
Module.___wasm_call_ctors (http://localhost:8000/foo.js:1:46999)↵ at func
(http://localhost:8000/foo.js:1:11692)↵ at callRuntimeCallbacks
(http://localhost:8000/foo.js:1:7729)"
7.
8. my code is:
9.
10. #include <math.h>
#include <emscripten.h>
#include <emscripten/bind.h>
#include <emscripten/html5.h>
using namespace emscripten;
class FOOWASMInterface
{
public:
FOOWASMInterface() { }
float bar(float value, bool up)
{
if(up)
return ceil(value);
else
return floor(value);
}
};
EMSCRIPTEN_BINDINGS(FOOModule) {
class_<FOOWASMInterface>("FOOWASMInterface")
.constructor<>()
.function("bar", &FOOWASMInterface::bar)
;
}
11. and my compile instruction is:
12.
13. em++ -O3 -std=c++14 -s ERROR_ON_UNDEFINED_SYMBOLS=0
foo_bindings.cpp --bind -s WASM=1 -o foo.js
14.
15. and my javascript is:
16.
17.
*Module = { onRuntimeInitialized: function () { var FOOLib = new
Module.FOOWASMInterface(); var value = FOOLib.bar(5.4, true);
console.log('5.4 ceil' + value); value = FOOLib.bar(5.4, false);
console.log('5.4 floor' + value); } };*
What mistake am I making?
1.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/179df92d-47f7-41ed-b156-8f87be1cfba8%40googlegroups.com.