Actually I'm using GSL in my c++ program. I've referred to the emscripten documentation but got nothing. This is what I see in the documentation, which makes no sense:
# For example, consider the case where a project “project” uses a library “libstuff”:
# Compile libstuff to bitcode
./emconfigure ./configure
./emmake make
# Compile project to bitcode
./emconfigure ./configure
./emmake make
# Compile the library and code together to HTML
emcc project.bc libstuff.bc -o final.html
(Isn't there something wrong with the documentation?) And it says nothing about how to use the library in javascript.
Here's the problems I have:
- How to build a third party library into bitcode?
- How to use the library in javascript?
Thanks in advance.
mainfunction that just calls one or two functions from GSL, and outputs a result to standard out, then answers could give you the commands to compile it.