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', ), '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); ?>

Compiling and building

The following steps describe how to compile and build WinCache on Windows OS:

  1. Open a command prompt which is used to build PHP

  2. Go to the root folder where PHP sources are present

  3. Run the command:

    cscript.exe win32\build\buildconf.js

  4. Run the command:

    configure.bat --help
    The output will contain a new flag --enable-wincache.

  5. Run the command:

    configure.js [all options used to build PHP] --enable-wincache
    --enable-wincache 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 --enable-wincache=shared.

  6. Run the command:

    nmake