Hi there
I am currently using embind to generate bindings for my C++ code so that it
can be invoked from non ASM JS code. I have a number of .a files that my
project is generating. My goal initially was to add emscripten bindings to
each .a file that my project was generating since each .a file has fairly
self contained functionality that can be used by consumers of my project.
However, I don't see any of the bindings exposed on my Module object when I
link the .a file with client code to form the final JS. Is this a known
issue with embind?
To clarify, here's an example:
a. Library customString.a has a customStringBindings.cpp file that gets
built into customString.a. This bindings file specifies the following
binding:
EMSCRIPTEN_BINDINGS(custom_string_module) {
class_<CustomString>("CustomString")
.constructor<const std::string&>()
.function("toStdString", &CustomString::ToStdString)
}
b. The final JS gets built with a link dependency on customString.a
c. I have some custom non ASM JS that attempts to create a new custom
string: var customString = new Module.CustomString("tempString");
This doesn't seem to work and I see an error saying that the Module has no
member named CustomString. However, if I move the bindings file into a
separate CPP file that gets used in step b, I can access
Module.CustomString just fine. Am I missing something here?
Thanks!
-Arnab
--
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].
For more options, visit https://groups.google.com/d/optout.