As discussed on irc, relevant links are http://mozakai.blogspot.com/2012/03/howto-port-cc-library-to-javascript.html http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html
- Alon On Tue, Sep 30, 2014 at 2:32 AM, moshe kravchik <[email protected]> wrote: > Hi, > > I'm new to Emscripten and have this fairly basic question. I have a .c > file with a function I want to convert to JS and call from another JS code. > How do I do it? > When I added main to my file that calls this function I can generate and > HTML fiel and run it. But when I remove main the function is no longer > called and is removed from the resulting .js file. > > Also, how do I call my function from the outside? > > Regards, > Moshe > > -- > 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.
