无法将其进一步编译为 php.exe in windows 10 + vs2015 + x64

not able to compile it further to php.exe in windows 10 + vs2015 + x64

我正在 windows 中为 php 7.0.4 创建自定义构建。遵循 https://wiki.php.net/internals/windows/stepbystepbuild until nmake snap. When I do nmake after the building of config it was giving me some errors and exiting with error 1077. So as per the VS Documentation https://msdn.microsoft.com/en-us/library/dt309377.aspx 中的过程一切都很好,我使用 /I 忽略错误并进一步构建。

问题是 -> I am getting a x86 build instead of x64 build。其次,rather than a clear build I am getting a manifest and development source. 我无法将它进一步编译为 .exe。我用来构建的命令很简单,就是 configure --disable-all --enable-cli --enable-cgi --with-pgo --enable-snapshot-build 。它是仅 php.exe、php-cgi.exe 且启用 pgo 的简单构建。

我做错了什么?欢迎任何帮助。

更新

我发现 --with-pgo 或向配置行添加任何其他扩展是错误 1077 的罪魁祸首。这可能是由于 deps 文件夹中缺少依赖项造成的吗?但我仍然无法解释为什么 X86 dist 进入 X64 文件夹。我有时会收到一条错误消息,指出内置构建配置与 X64 文件夹规范不匹配。不确定发生了什么无法通过启用额外扩展来复制 1077 以外的问题。

您可能想看看这个 https://github.com/johmue/win-php-sdk-builder github 项目。

通过从配置脚本中删除 --with-pgo 解决了致命错误 1077 的问题。它的构建过程(在 PHP7 中优化)与文档中正常编译的步骤不同

构建 X86 而不是 X64 的问题是由于 vc 开发人员命令提示符中 cl.exe 的环境架构。它被设置为 x86。我通过提供命令 vcvarsall X64 和配置命令来更改它,nmake 命令可以为 X64 创建构建。

特别感谢 Windows PHP 团队,特别是 Pierre 识别它。