Google V8 javascrit Research (1)

Source: Internet
Author: User

Google Chrome is an open source project, V8 itself is also an open source project, the address is http://code.google.com/p/v8.
After checking out, you can directly open tools \ Visual Studio \ v8.sln to compile it. The official version is vs2005, and I use 2008. Note that many Google developers use Python (three major Google languages: C ++, Java, and Python) and V8.

The VS solution file of chrome and V8 uses the *. vsprops file. So you can see that every day in solution, the project does not define the include path and library path, because they are all written in the vsprops file.

For example: tools \ visualstudio \ common. vsprops

<? XML version = "1.0" encoding = "Windows-1252"?>
<Visualstudiopropertysheet
Projecttype = "Visual C ++"
Version = "8.00"
Name = "essential"
Outputdirectory = "$ (solutiondir) $ (configurationname )"
Intermediatedirectory = "$ (solutiondir) $ (configurationname) \ OBJ \ $ (projectname )"
Characterset = "1"
>
<Tool
Name = "vcclcompilertool"
Additionalincludedirectories = "$ (projectdir) \... \ .. \ SRC; $ (intdir) \ derivedsources"
Preprocessordefinitions = "Win32; _ blank; _ crt_nonstdc_no_deprecate; _ use_32bit_time_t; _ has_exceptions = 0; pcre_static; enable_logging_and_profiling"
Minimalrebuild = "false"
Exceptionhandling = "0"
Runtimetypeinfo = "false"
WarningLevel = "3"
Warnaserror = "true"
Detect64bitportabilityproblems = "false"
Debuginformationformat = "3"
Disablespecificwarnings = "4355; 4800"
Enablefunctionlevellinking = "true"
/>
<Tool
Name = "vclibrariantool"
Outputfile = "$ (outdir) \ Lib \ $ (projectname). lib"
/>
<Tool
Name = "vclinkertool"
Generatedebuginformation = "true"
Mapfilename = "$ (outdir) \ $ (targetname). Map"
Importlibrary = "$ (outdir) \ Lib \ $ (targetname). lib"
Targetmachine = "1"
Fixedbaseaddress = "1"
Additionaloptions = "/ignore: 4221/nxcompat"
/>
</Visualstudiopropertysheet>

 

At first, I did not understand the location of $ (solutiondir. It is actually the path where *. sln is located. Therefore, when you create a solution file, it must be in the same path structure as the solution file in the example. You can use this method to organize a project after the file directory structure is determined.

Visual Studio also has several methods

1. Set Project dependency. This method can solve the Lib problem, but cannot solve the include path problem.
2. Set Reference Lib in the project setting of the project. Similarly, this cannot solve include path.
3. Set C ++ include path in vs options, which is generally used in the path of system Lib.
4. InSource codeUse relative paths, such as .. \ include, but this limits the hierarchical structure of the file.

It seems that *. vsprops is a good choice.

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.