seaprince.cn
开始前准备
开始之前,你需要准备如下东西:
- Microsoft Visual C++, 建议Visual C++ 2008, 速成版或专业版都可以。
- Windows SDK,下载地址:aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en 不建议用那个网络安装,慢死,还不知道什么时候能完。还有就是建议全部安装。
- 其他工具,下载地址:http://pecl2.php.net/downloads/php-windows-builds/php-libs/binary-tools.zip
编译步骤
- 下载并安装VC++ 2008,并安装。
- 安装windows sdk 6.1
- 下载php5.3,下载地址:http://cn.php.net/get/php-5.3.0.tar.bz2/from/this/mirror
- 创建文件夹,比如C:php-sdk
- 把上面第三步下载的包解压到这里,解压完时C:php-sdk里应该有两个子目录bin, script
- 在开始菜单处打开Microsoft Windows SDK v6.1/CMD Shell,输入命令:
setenv /x86 /xp /release
cd c:php-sdk
binphpsdk_setvars.bat
binphpsdk_buildtree.bat php53dev - 上一步会创建一些目录。进入vc9x86,把php5.3.0解压在这里,解压后目录结构:vc9x86php5.3.0
- 在WIN-SDK的命令行下输入:
cd C:php-sdkphp53devvc9x86php5.3.0
buildconf - 到了这一步,就和linux下差不多了,你可以看一下编译的选项帮助:
configure –help - 好,我们来一个最小化的编译:
configure –disable-all –enable-cli
nmake - 这一步在php wiki上是没有问题,但由于我们是中文环境,会报下面的错误:
- 用Editplus打开extstandardrowscap.c这个文件,
选是,并选择Western European (Windows)
然后另存为UTF-8编码。 - 重新nmake编译,然后用nmake snap编译成最终二进制包。二进制包在php-5.3.0Release_TS下。可能的名字是php-5.3.0-Win32-VC9-x86.zip
- 测试一下:
下一篇文章再写怎么编译pecl扩展。
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article
Assassin's Creed Shadows: Seashell Riddle Solution
3 weeks agoByDDD
What's New in Windows 11 KB5054979 & How to Fix Update Issues
2 weeks agoByDDD
Where to find the Crane Control Keycard in Atomfall
3 weeks agoByDDD
Saving in R.E.P.O. Explained (And Save Files)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Atom editor mac version download
The most popular open source editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 English version
Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.