I have a basic C++ GLUT program and I am trying to run Javascript code from inside C++ functions. I found Emscripten and done lots of testing, but I can't figure out how to actually use it in my projects. I added the emscripten folder to my compiler's search directories and was able to #include , but I keep getting 'Undefined reference to emscripten_run_script.' I know this is a problem with not linking the libraries (-1SDL, -1glew32, etc.). I checked examples and tutorials from the Emscripten website, but I don't need code, I need example projects or just the name and location of the Emscripten library. How do I link Emscripten so that I can call Emscripten functions from my program, or is it even possible?
EDIT:
Since Emscripten is a Javascript compiler, is there a way I can (instead of linking the library to my project) have Emscripten stand in as the compiler for part of the code, then switch back to g++?