dongshan3806 2014-06-03 15:59 采纳率: 0%
浏览 93
已采纳

在Windows上编译php_excel(v1.0.0)和LibXL(v3.5.4.1)

I've tried to compile the PHP extension php_excel (v1.0.0) on VC9 with no luck, anyone able to provide guidance? I've used notes found on the web for compiling other PHP extensions as a reference but there are so many unknowns, I'm not a C developer so please bear with me. I would like to know how to compile extensions but if someone was able to just compile it for me I would still very much appreciate it.

Update: Step-by-step process below to SUCCESSFULLY compile the php_excel extension

INSTALLATION
============
Install Microsoft Windows Server 2003 x86 incl. Service Packs
Install Microsoft .NET Framework 2.0
Install Microsoft Windows SDK v6.1 (6.0.6001.18000.367-KRMSDK_EN.iso)
Install en_visual_studio_2008_professional_x86_dvd_X14-26326.iso
Install en_visual_studio_2008_service_pack_1_x86_dvd_x15-12962.iso
Install Microsoft Visual C++ 2008 SP1
Extract php-sdk-binary-tools-20110915.zip to C:\php-sdk
Extract deps-5.3-vc9-x86.7z to C:\php-sdk\phpdev\vc9\x86\deps
Extract php-5.3.28-src.zip to C:\php-sdk\phpdev\vc9\x86\php-5.3.28

Open Microsoft Windows SDK v6.1 > CMD Shell

COMMANDS (to compile PHP)
=========================
setenv /x86 /xp /release
cd /d c:\php-sdk\
bin\phpsdk_setvars.bat
bin\phpsdk_buildtree.bat phpdev
cd /d C:\php-sdk\phpdev\vc9\x86\php-5.3.28
buildconf
configure --help
configure --enable-apache2-2handler --with-curl --enable-fileinfo --enable-mbstring --enable-mbregex --with-mcrypt --with-openssl --with-pgsql --enable-sockets --with-mysql --with-mysqli --enable-pdo --with-pdo-mysql --with-pdo-mssql --with-pdo-pgsql --enable-soap --with-xmlrpc --with-xsl
nmake
nmake clean all

LibXL (additional steps)
========================
Extract php_excel-1.0.0.zip to C:\php-sdk\phpdev\vc9\x86\php-5.3.28\ext\excel
Extract \libxl-3.5.4.1\include_c\* to C:\php-sdk\phpdev\vc9\x86\deps\include\libxl
Extract \libxl-3.5.4.1\lib\libxl.lib to C:\php-sdk\phpdev\vc9\x86\deps\lib\libxl.lib
buildconf
configure --with-excel=shared
nmake

php_excel (branch v1.0.0) https://github.com/iliaal/php_excel/tree/v1.0.0

LibXL for Windows 3.5.4 http://www.libxl.com/download.html

System:

  • Windows Server 2003 R2
  • PHP 5.3
  • Apache 2.2
  • php_excel 1.0.0
  • LibXL 3.5.4.1
  • Visual Studio 2008 (VC9)
  • 写回答

3条回答 默认 最新

  • duanchu7271 2014-06-06 10:12
    关注

    Snapshots was made available under http://windows.php.net/downloads/pecl/snaps/excel/20140606/

    Though I'm not sure there's no legal issue redistributing the libxl that way, so no guarantee for how long the builds may stay there. If you're intended to continuously use this library, please decide to file an issue to the origin repository about proposing the extension to PECL. Being in PECL will bring many advantages as we'll be able to continuously support it, also automatic builds will be available.

    For building extensions yourself, see https://wiki.php.net/internals/windows/stepbystepbuild . The most important thing regarding VC9 - be sure using service pack 1. Be informed that everyone is welcome to ask questions on PECL mailing lists and #php.pecl on efnet.

    Just to mention - as alternative you could use the com_dotnet extension available in the core to achieve the goals.

    Thanks.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!