I recommend declaring C++ functions you use in WebAssembly as extern "C" (unless you use C++ symbol naming features such as overloading, classes, or namespaces).
extern "C"
This way, the compiler won't mangle the name into a garbled mess:
extern "C" float mandelIter(float x, float y, int maxIter) { ...
Use as
wasm.mandelIter(x, y, maxIter);
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I recommend declaring C++ functions you use in WebAssembly as
extern "C"
(unless you use C++ symbol naming features such as overloading, classes, or namespaces).This way, the compiler won't mangle the name into a garbled mess:
Use as