<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/wincache.win32build.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'wincache.win32build.building.php',
    1 => 'Compiling and building',
    2 => 'Compiling and building',
  ),
  'up' => 
  array (
    0 => 'wincache.win32build.php',
    1 => 'Building for Windows',
  ),
  'prev' => 
  array (
    0 => 'wincache.win32build.prereq.php',
    1 => 'Prerequisites',
  ),
  'next' => 
  array (
    0 => 'wincache.win32build.verify.php',
    1 => 'Verifying the build',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/wincache/win32build.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="wincache.win32build.building" class="section">
   <h2 class="title">Compiling and building</h2>
   <p class="para">
    The following steps describe how to compile and build WinCache on Windows OS:
   </p>
   <div class="procedure">
    <ol type="1"><li>
     <p class="simpara">Open a command prompt which is used to build PHP</p>
    </li>
    <li>
     <p class="simpara">Go to the root folder where PHP sources are present</p>
    </li>
    <li>
     <p class="para">
      Run the command:
      <div class="example-contents">
<div class="cmdcode"><pre class="cmdcode">cscript.exe win32\build\buildconf.js</pre>
</div>
      </div>

     </p>
    </li>
    <li>
     <p class="para">
      Run the command:
      <div class="example-contents">
<div class="cmdcode"><pre class="cmdcode">configure.bat --help</pre>
</div>
      </div>

      The output will contain a new flag <code class="literal">--enable-wincache</code>.
     </p>
    </li>
    <li>
     <p class="para">
      Run the command:
      <div class="example-contents">
<div class="cmdcode"><pre class="cmdcode">configure.js [all options used to build PHP] --enable-wincache</pre>
</div>
      </div>

      <code class="literal">--enable-wincache</code> is the only extra option which is 
      required to ensure that WinCache extension gets built properly. 
      This option will build WinCache and will statically link it with PHP dll. 
      To build WinCache extension as a stand-alone DLL use the option 
      <code class="literal">--enable-wincache=shared</code>.
     </p>
    </li>
    <li>
     <p class="para">
      Run the command:
      <div class="example-contents">
<div class="cmdcode"><pre class="cmdcode">nmake</pre>
</div>
      </div>

     </p>
    </li>
   </ol></div>
  </div><?php manual_footer($setup); ?>