Jump to content
  • Advertisement
Sign in to follow this  

Compile C++ to JavaScript for Web Pages from Visual Studio?

This topic is 2272 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


I think some people here might be interested to know about my latest project, called vs-tool. It is a plugin for Visual Studio 2010 which enables the integration of external compiler/linker toolchains into VS. The hard work was done by Gavin Pugh, the author of vs-android, who developed a MSBuild task plugin to allow invoking GCC from VS. For vs-tool, the following toolchains are now supported:

- Build with MinGW: http://dl.dropbox.co...de/vs-mingw.png

Allows building Windows applications if you have installed the MinGW compiler.

- Build with llvm-clang: http://dl.dropbox.co...de/vs-clang.png

Allows compiling with the clang compiler. Note however, that clang does not yet fully support building windows applications, but I have tested that simple hello world code at least builds and runs ok.

- Build with Emscripten: http://dl.dropbox.co...ode/vs-emcc.png

Emscripten is a wonderfully geeky and absurd project, where LLVM bytecode is translated into executable .js for the web. This means one can compile C++ code directly into .js. The project is developed by Alon Zakai from Mozilla, find the homepage at https://github.com/k...emscripten/wiki , and a technical paper at https://raw.github.c.../docs/paper.pdf . The main motivation that had me start building vs-tool was to add support for Emscripten directly into Visual Studio, which is now working quite nicely (adding MinGW and Clang support was a bit of a side tour). Rather insanely, Emscripten supports translating GLES2 code directly into WebGL code, which allows me to work on converting my Android GLES2 engine directly for the web, from Visual Studio! This is so hackish, insane, fun, and crazy, at the same time.

The homepage for vs-tool is at github: https://github.com/juj/vs-tool

If you give it a go, let me know how it goes!

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!