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

Windows中搭建PHP扩展开发环境

Jun 06, 2016 pm 07:54 PM
php windows develop Expand build environment compile

二、编译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 of this Website
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 Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

How to update the latest version of Bybit Exchange? Will there be any impact if it is not updated? How to update the latest version of Bybit Exchange? Will there be any impact if it is not updated? Feb 21, 2025 pm 10:54 PM

How to update the latest version of Bybit Exchange? Will there be any impact if it is not updated?

deepseek web version entrance deepseek official website entrance deepseek web version entrance deepseek official website entrance Feb 19, 2025 pm 04:54 PM

deepseek web version entrance deepseek official website entrance

How to install deepseek How to install deepseek Feb 19, 2025 pm 05:48 PM

How to install deepseek

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node? Mar 05, 2025 pm 05:57 PM

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node?

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

How To Set Up Visual Studio Code (VS Code) for PHP Development

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

How do you parse and process HTML/XML in PHP?

Coinsuper exchange software channel official website entrance Coinsuper exchange software channel official website entrance Feb 21, 2025 pm 10:39 PM

Coinsuper exchange software channel official website entrance

See all articles