Don’t panic! Emscripten is here to help us in this difficult task.
Using Emscripten, you can
You can go through the project at the following link: https://github.com/kripken/emscripten/
Steps are, relatively, easy:
1) Download the code;
2) Unzip it and go into the folder;
3) Run the following command:
At this point, a file containing the main path dependencies will be created, and Emscripten will be ready to use (crossed fingers for dependencies).
Now let’s try this command:
./emcc tests/hello_world.cpp -o my_first_example.html
Double click on the html file and watch the awesomeness on you browser
For more info visit the following link: https://github.com/kripken/emscripten/wiki
However, in a world as technology changes quickly in a really short period, it makes sense creating something portable to various platforms (e.g. Android,iOS, Wp, FirefoxOS, computers).
In lots of cases it is worth to choose a simple solution as this one and conquering the market with a cross platform product.