Introduction
V8 JavaScript Engine is Google Chrome's JavaScript Engine. Unlike the interpretation and execution principles of other Javascript Engines, it directly compiles Javascript into binary code and then executes it! And V8 JavaScript Engine is open source: http://code.google.com/apis/v8,
V8 also has an attractive point in that it can be compiled into a static/dynamic library, and then you can use it in your own C ++ program. This article describes how to compile V8 into a dynamic library.
For more information, see: http://code.google.com/apis/v8/build.html
Preparations
You need to download and install the following software:
- Subversion 1.4 or higher-see http://subversion.tigris.org/links.html#clients
- Python 2.4 or higher-see http://www.python.org
- Scons 1.0.0 or higher-see http://www.scons.org
Download source code
SVN: http://v8.googlecode.com/svn/trunk/
Compile
You can use v8.sln compilation under the tools/visual_studio directory. However, we recommend that you use the CMD command to make it easier!
Use the above command to produce a dynamic library named v8_g.dll of the debug version in the v8_source directory!
For more detailed commands, refer to here: http://code.google.com/apis/v8/build.html
Now the dynamic library is created successfully. You can also choose to generate a static library!
If you want to compile through vs, you can refer to this: http://blog.csdn.net/holemole/archive/2009/05/08/4157257.aspx