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
Export emscripten::val and emscripten::memory_view
in order to prevent embind errors:
BindingError: _emval_take_value has unknown type N10emscripten11memory_viewIhEE
Embind generates a numerical type id from the address
of the std::type_info object resulting from evaluating
a typeid expressiion (e.g. 'void *id = &typeid(T)').
However, C++ does not guarantee that this address is
identical for all evaluations of the typeid expression.
In practice it is when using static linking, but not
when using dynamic linking when the libraries are
built with the '-fvisibility=hidden' compiler option.
The non-identical id's then cause embind to decide
that types have not been registered when used from a
library, since they have been registered with a different
id by the main wasm module.
Exporting the types in question makes typeid addresses
identical again, and fixes/works around the issue.
0 commit comments