You can write your bindings in a completely separate file.  For example,
you might have a file called LibraryBindings.cpp:

#include <Library.h>

EMSCRIPTEN_BINDINGS(Library) {
    class_<LibraryClass>("LibraryClass")
        ...
        ;
}

Emscripten doesn't support shared libraries to my knowledge, but if you
mean you'd like to expose bindings for something you've already compiled
with emscripten into LLVM bitcode files, then that should work.

Hope that helps,
Chad




On Tue, Aug 26, 2014 at 1:26 PM, Lóránt Pintér <[email protected]>
wrote:

>  Hi,
>
> I’d like to use embind to generate bindings for and existing library. I’d
> like to do this without having to modify the original source code, but the
> documentation says that I need to add EMSCRIPTEN_BINDINGS in the source
> files. Is there a way to do this in a way that I could supply the bindings
> from some external files? Can I generate bindings for an already built
> shared library maybe?
> —
> Lóránt
>
> --
> 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.
>



-- 
Chad Austin
Technical Director, IMVU
http://engineering.imvu.com <http://www.imvu.com/members/Chad/>
http://chadaustin.me

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