search
Homephp教程php手册Windows中搭建PHP扩展开发环境

Windows中搭建PHP扩展开发环境

Jun 06, 2016 pm 07:54 PM
phpwindowsdevelopExpandbuildenvironmentcompile

二、编译PHP 首先下载php-sdk,先下载较新的php-sdk-binary-tools-20110915.zip,解压到 f:\php_stdio\ php-sdk 目录下。注意,解压后,这个目录下应该有bin和script子目录。 开一个cmd窗口,切换到f:\php_stdio\php-sdk 目录下,运行vcvarsall.bat来设置好

二、编译PHP

首先下载php-sdk,先下载较新的php-sdk-binary-tools-20110915.zip,解压到

f:\php_stdio\php-sdk

目录下。注意,解压后,这个目录下应该有bin和script子目录。

开一个cmd窗口,切换到f:\php_stdio\php-sdk目录下,运行vcvarsall.bat来设置好编译环境变量。

VS2008安装路径\VC\vcvarsall.bat

这里vcvarsall.bat的具体目录要根据你自己的安装位置而定。

接着,进入在cmd窗口里继续运行以下命令:

bin\phpsdk_setvars.bat

bin\phpsdk_buildtree.bat php54dev

这样,在f:\php_stdio\php-sdk目录下又多了一个php54dev目录。

接着继续将deps解压到

f:\php_stdio\php-sdk\php54dev\vc9\x86\

目录下。原来这个目录下的deps目录下的所有子目录均是空目录,解压后,应该复制进很多必要的模块/扩展所需的库文件。

接下来,将PHP-5.4.5源码目录复制一份到

f:\php_stdio\php-sdk\php54dev\vc9\x86\

目录下。进入php源码目录

cd f:\php_stdio\php-sdk\php54dev\vc9\x86\php-5.4.5

运行

buildconf

然后就可以先试着编译php了。最开始,一般编译尽可能少的模块,先让核心能正常编译出来:

configure --disable-all --enable-cli


      这一步的主要目的是生成config.w32.h,如果需要生成PHP,可以继续执行

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

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Article

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use