I don't think embind supports this kind of namespace embedding, but the
names are always available in global scope. If someone wants to work on
this feature, I think it might be useful to add in.

2015-12-18 21:29 GMT+02:00 Greg Marr <[email protected]>:

> I have an API that is in a namespace, and uses nested namespaces to help
> organize functions.  I want to use those same namespaces in javascript, but
> haven't found a way to make it work.
>
> I tried writing it like this:
>
> EMSCRIPTEN_BINDINGS(MyAPIBindings)
> {
>     emscripten_function("MyAPI.Function", &MyAPI::Function)
> }
>
> and then calling it in javascript like this:
>
>     Module.MyAPI.Function()
>
> but I get an error that Module.MyAPI is unknown.
>
> Am I doing something wrong?  Is this even possible?  I haven't found any
> examples of using namespaces in Embind.
>
> Thanks,
> Greg
>
> --
> 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.
>

-- 
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.

Reply via email to