简体   繁体   中英

Compiling PHP extension for windows

I am trying to compile PHP-7.0.11 and a sample extension on Windows 8.1 using Visual Studio 2015. I am following https://wiki.php.net/internals/windows/stepbystepbuild . I have followed every step but still getting the following error:

{
    bison.exe --output=Zend/zend_language_parser.c -v -d -p zend Zend/zend_language_parser.y
    zend/zend_language_parser.y:49: unrecognized: %code
    zend/zend_language_parser.y:49:    Skipping to next %
    zend/zend_language_parser.y:52: unrecognized: %destructor
    zend/zend_language_parser.y:52:    Skipping to next %
    zend/zend_language_parser.y:53: unrecognized: %destructor
    zend/zend_language_parser.y:53:    Skipping to next %
    NMAKE : fatal error U1077: '"C:\Program Files\ux-utils\bison.exe"' : return code '0x1'
    Stop.
}

Also, I have noticed that zend_language_parser.c file is not generating in Zend directory.

This could also be because you have old version of bison.exe . I wanted to compile php5.6 with php-sdk-binary-tools-20110512 tools. which has version of bison that resulted in this error. Whereas php-sdk-binary-tools-20110915 tooling has version 2.4.1 which perfectly compiles it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM