Revision: 3706
Author: [email protected]
Date: Tue Jan 26 02:06:20 2010
Log: Edited wiki page through web user interface.
http://code.google.com/p/v8/source/detail?r=3706
Modified:
/wiki/BuildingOnWindows.wiki
=======================================
--- /wiki/BuildingOnWindows.wiki Tue Jan 26 01:12:32 2010
+++ /wiki/BuildingOnWindows.wiki Tue Jan 26 02:06:20 2010
@@ -14,7 +14,7 @@
There are Visual Studio project files located in `tools\visual studio` for
building V8 using the Visual Studio IDE. Please refer to the `README.txt`
file in that directory for details. When using the Visual Studio IDE for
building the project please update the `PATH` in _My
Computer->Properties->Advanced->Environment Variables_ as the Visual Studio
project files uses Python for some of the build steps.
=== ===
-=== Using Visual Studio 2005 ===
+== Using Visual Studio 2005 ==
SCons 1.0.0 should be able to detect Visual Studio 2005 and set up the
build environment automatically so no additional options should be required
to run the commands mentioned in the documentation.
To build using Visual Studio 2005 however requires Visual Studio 2005 SP1
to be installed. Please download and install
[http://www.microsoft.com/downloads/details.aspx?familyid=bb4a75ab-e2d4-4c96-b39d-37baf6b5b1dc&displaylang=en
VS80sp1-KB926601-X86-ENU.exe] from Microsoft. Link errors like the one
below is an indication of Visual Studio 2005 SP1 not beeing installed.
@@ -24,20 +24,20 @@
LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual char const *
__thiscall std::exception::what(void)const "
(?w...@exception@std@@UBEPBDXZ) already defined in mksnapshot.obj
}}}
-=== Selecting Visual Studio C++ Runtime Library ===
+== Selecting Visual Studio C++ Runtime Library ==
The SCons build has an option to control which Visual Studio C++ Runtime
Library to use when linking V8. The possible options are `static`
(statically linked in to the V8 library) and `dynamic` (using the DLL
version). The default is `static`. The following example uses the shared
runtime library.
{{{
> scons msvcrt=shared
}}}
*NOTE:* The runtime library to use (static or shared) can be selected
independently of the type selected for the V8 library itself (also static
or shared).
-=== Controlling Link-time Code generation ===
+== Controlling Link-time Code generation ==
The SCons build option `msvcltcg` can be used to control whether Visual
C++ is instructed to do link-time code generation or not. The default is
`on` the it can be switched off using `off`.
{{{
> scons msvcltcg=off
}}}
-=== Using Visual Studio 2008 ===
+== Using Visual Studio 2008 ==
As SCons version 1.0.0 does not detect Visual Studio 2008, you will need
to supply an additional `env` option to SCons. The `env` option is used to
override the environment paths SCons is using. For Visual Studio 2008 it is
required to override PATH, INCLUDE and LIB.
The setup batch file supplied with Visual Studio 2008 will set the
environment variables PATH, INCLUDE and LIB to the correct values. To use
the Visual Studio 2008 environment setup either use the link _Visual Studio
2008 Command Prompt_ from the Visual Studio 2008 installation, or use a
fresh Command Prompt and run the `vcvarsall.bat` from the `VC` directory of
the Visual Studio 2008 installation. Assuming that the default installation
directories have been used the following command will do that.
@@ -55,14 +55,15 @@
If for some reason setting the environment variables is not feasible the
paths can be passed directly. The following example passes these paths for
a Visual Studio 2008 installation assuming that the default installation
directories have been used.
||`> scons env="PATH:C:\Program Files\Microsoft Visual Studio
9.0\VC\bin;C:\Program Files\Microsoft Visual Studio
9.0\Common7\IDE;C:\Program Files\Microsoft Visual Studio
9.0\Common7\Tools,INCLUDE:C:\Program Files\Microsoft Visual Studio
9.0\VC\include;C:\Program Files\Microsoft
SDKs\Windows\v6.0A\Include,LIB:C:\Program Files\Microsoft Visual Studio
9.0\VC\lib;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib"`||
+
=== ===
-=== Using Visual C++ Express 2008 ===
+== Using Visual C++ Express 2008 ==
As for Visual Studio 2008 SCons alos does not detect Visual C++ Express
2008 and the `env` 2options to SCons is required. In contrast to Visual
Studio 2008 the path for Visual C++ Express 2008 are determined correctly
so only include and library paths have to be overridden. The following
example passes the include and library path for a Visual C++ Express 2008
installation assuming that the default installation directories have been
used.
||`>scons env="INCLUDE:C:\Program Files\Microsoft
SDKs\Windows\v6.0A\Include;C:\Program Files\Microsoft Visual Studio
9.0\VC\include,LIB:C:\Program Files\Microsoft
SDKs\Windows\v6.0A\Lib;C:\Program Files\Microsoft Visual Studio
9.0\VC\lib"`||
=== ===
-=== Running tests on Windows ===
+== Running tests on Windows ==
When running the tests using `tools\test.py` on Windows SCons is used to
build the tests written in C++. Therefore if using Visual Studio 2008 or
Visual C++ Express 2008 the additional ´env´ option have to be passed. The
script `tools\test.py` has an option `-S` to specify options which are
passed to SCons. For Visual C++ Express 2008 it will look like this.
||`>tools\test.py -S env="INCLUDE:C:\Program Files\Microsoft
SDKs\Windows\v6.0A\Include;C:\Program Files\Microsoft Visual Studio
9.0\VC\include,LIB:C:\Program Files\Microsoft
SDKs\Windows\v6.0A\Lib;C:\Program Files\Microsoft Visual Studio
9.0\VC\lib"`||
@@ -71,8 +72,17 @@
||`>tools\test.py -S msvcltcg=off`||
-=== Paths on 64-bit Windows Vista ===
-On 64-bit Windows Vista replace the prefix `C:\Program Files` with
`C:\Program Files (x86)` in all the examples above.
+== Paths on 64-bit Windows Vista ==
+SCons 1.0.0 does not support neither Visual Studio 2005 nor Visual Studio
2008 on 64-bit Windows Vista, so the environment override is required for
both versions. Using the setup batch file supplied with Visual Studio and
invoking SCons as follows is the simplest solution.
+
+{{{
+> scons env="PATH:%PATH%,INCLUDE:%INCLUDE%,LIB:%LIB%"
+}}}
+
+==== Explicit Visual Studio 2008 paths ====
+For Visual Studio 2008 the installation on 64-bit Windows Vista has files
in both `C:\Program Files` and `C:\Program Files (x86)`. If not using the
setup batch file supplied with Visual Studio 2008 the following environment
override should used when invoking SCons.
+
+PATH:C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;C:\Program
Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program
Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files
(x86)\Microsoft Visual Studio 9.0\Common7\Tools,INCLUDE:C:\Program Files
(x86)\Microsoft Visual Studio 9.0\VC\include;C:\Program Files
(x86)\Microsoft SDKs\Windows\v6.0A\Include;C:\Program Files\Microsoft
SDKs\Windows\v6.0A\Include,LIB;C:\Program Files (x86)\Microsoft Visual
Studio 9.0\VC\lib;C:\Program Files (x86)\Microsoft
SDKs\Windows\v6.0A\Lib;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib
=== ===
=== Building the `hello_world` sample on Windows ===
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev