如何在Windows上使用cygwin / mingw编译PHP扩展? [英] How do you compile a PHP extension on windows with cygwin/mingw?

查看:1337
本文介绍了如何在Windows上使用cygwin / mingw编译PHP扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想建立 RabbitMQ PHP封装 AMPQ PHP wrapper 在Windows(64)上使用Cygwin。
我已经成功构建了底层的C库(librabbitmq.dll),但我被困在'phpize'步骤:



phpize &&& ./configure --with-rabbit&&&制作&& sudo make install



如果我理解正确,windows上没有'phpize',那么如何构建我的PHP包装? p>

请注意,我是构建PHP扩展(不管是在linux还是windows上)的全新功能。

解决方案

完全不支持。 PHP设计为在UNIX / POSIX系统上使用GNUmake进行编译,在Windows系统上使用Visual C ++进行编译。



你唯一的选择是下载 Microsoft Visual Studio 2008 Express (据我所知,2010目前未通过认证工作)。



然后,您可以链接到使用mingw在您自己的自定义扩展中编译的dll。尝试此Stack Overflow指南:从MinGW静态库(.a)到Visual Studio静态库(.lib)


I am trying to build the RabbitMQ PHP wrapper and the AMPQ PHP wrapper on Windows (64) using Cygwin. I have successfully built the underlying C library (librabbitmq.dll) but I am stuck at the 'phpize' step:

phpize && ./configure --with-rabbit && make && sudo make install

If I understand correctly, there is no 'phpize' on windows, so how do I build my PHP wrapper?

Note that I'm totally new to building PHP extensions (be it on linux or windows).

解决方案

This is totally not supported. PHP is designed to be compiled with GNUmake on UNIX/POSIX systems and Visual C++ on Windows systems.

Your only option, really, is to download Microsoft Visual Studio 2008 Express (2010 is not certified to work at present, to my knowledge).

You can then link to dlls compiled using mingw in your own custom extension. Try this Stack Overflow guide: From MinGW static library (.a) to Visual Studio static library (.lib).

这篇关于如何在Windows上使用cygwin / mingw编译PHP扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆