Compile V8 engine steps with visual Studio 2010/2013 to share _c language

Source: Internet
Author: User
Tags svn python script visual studio 2010


Compiling the V8 engine with Visual Studio 2013





code as follows:

Prepare for work, install PYTHON2.X,GIT,SVN:

Git:http://msysgit.github.io
Svn:http://www.sliksvn.com/en/download
python:https://www.python.org/downloads/

The first step, get V8 Source:
Https://github.com/v8/v8-git-mirror

The second step, get Cygwin, put the Third_party folder under the V8 Source:
SVN co http://src.chromium.org/svn/trunk/deps/third_party/cygwin third_party/cygwin Third step, get ICU, put into V8 source under the Third_ Party folder:
SVN Co https://src.chromium.org/chrome/trunk/deps/third_party/icu46 Third_party/icu

Step fourth, build the project file:

Python build\gyp_v8

Step fifth, use VS2013 to open All.sln for compilation

Other JavaScript engines: Http://en.wikipedia.org/wiki/List_of_ECMAScript_engines





Compiling the V8 engine under Windows-with Visual Studio 2010



Download:



1. Find the Google website that downloads the source code.
2. Prompts to download the source file using the SVN command. SVN is the meaning of subversion. Please download the Subversion console client.
3. Execute the prompt command, you can download.



Compile:



1. Because there is python code inside, download the install Python script interpreter.
2. Open the V8.sln in the V8\tools\visual_studio catalogue.
3. In the Visual Studio 2010 development environment, executable files in the project properties add the $ (SystemRoot) \system32 and Python interpreter path as follows: C:\Python26. These paths are used at compile time.
4. Build V8_base first, then BUILDV8. No problem.



At this point is the static library, very large, if you want to compile into a DLL, the following processing:



1. Add preprocessing macros to V8_base and V8 building_v8_shared
2. Convert V8 to Dynamic link library (V8 property pages->configuration properties->general->configuration Type)
3. Add $ (OutDir) \lib to V8 Additional Library directories
4. Add V8_base.lib ws2_32.lib Winmm.lib in V8 Additional dependencies.
5. Compile v8_base and V8 in turn.



After this operation some still cannot compile the V8 engine successfully, then can use the following method to compile



1, install Python
2, the installation of SCons more than 1.0 version
3. Open cmd, enter your V8 source directory
4. Input
CMD "" C:\Program Files\Microsoft Visual Studio 9.0\vc\vcvarsall.bat ""
5. Input
SCons Mode=debug library=shared Snapshot=on
6. This can generally be compiled successfully
It should be OK.



Use only v8.h, V8.lib, V8.dll can be used.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.