How do I compile an extension for PHP 5.3 for windows as a DLL?(如何将适用于 Windows 的 PHP 5.3 扩展编译为 DLL?)
问题描述
我目前正在重写一个最初为 PHP 4.2.2 编写的 我的问题是让构建/编译过程生成一个 PHP 扩展..dll 而不是将扩展编译到 PHP 核心.环境是windows server 2003,我用的是Visual Studio 2008.
I'm currently rewriting a PHP Extension that was originally written for PHP 4.2.2. My issue is having the build/compile process generate a .dll instead of compiling the extension into the PHP core. The environment is windows server 2003. I'm using Visual Studio 2008.
我使用EXT_SKEL脚本生成框架,可以成功将扩展编译到php核心中.我正在尝试将其编译为 .dll 以便我可以轻松地将其分发给我的客户.任何人都可以指出我如何告诉 PHP 5.3 构建过程的正确方向,我想将我的扩展编译为 .dll 而不是静态地编译成 PHP 本身?
I used the EXT_SKEL script to generate the framework, and I can succesfully compile the extension into the php core. I'm trying to instead compile it as a .dll so I can easily distribute it to my clients. Can anyone point me in the right direction for how to tell the PHP 5.3 build process that i'd like to compile my extension as a .dll instead of staticly into PHP itself?
为了构建我运行的扩展框架:
To build the extension's framework I run:
php.exeext_skel_win32.php --extname=myextension --proto=myprototypefile.dat- 修改了 config.w32 以取消对ARG_ENABLE"行的注释并启用默认值
buildconf.batcscript/nologo configure.js- nmake
我确认我可以从 PHP 中运行扩展的方法,但是它不会生成可分发的 .dll.相反,它将方法编译为 PHP 二进制文件.有人能指出我正确的方向吗?
I confirm that I can run the extension's methods from within PHP, however it does not produce a distributable .dll. instead it compiles the methods into the PHP binary. Can anyone point me in the right direction?
推荐答案
尝试
configure.js --enable-myextension=shared
也可能是
configure.js --with-myextension=shared
这篇关于如何将适用于 Windows 的 PHP 5.3 扩展编译为 DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何将适用于 Windows 的 PHP 5.3 扩展编译为 DLL?
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- PHP - if 语句中的倒序 2021-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
