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).
On Windows, you have two ways to load a PHP extension: either compile it into PHP, or load the DLL. Loading a pre-compiled extension is the easiest and preferred way. To load an extension, you need to have it available as a ". dll" file on your system.
MinGW is higher performance than Cygwin, but it's also 32-bit which may be a problem with your applications. There is a 64-bit environment similar to MinGW but it's a different project. MinGW-w64 is in all senses the successor to MinGW. org's version.
You can install MinGW-W64 under "Cygwin" by selecting these packages (under "Devel" category): mingw64-x86_64-gcc-core : 64-bit C compiler for native 64-bit Windows. The executable is " x86_64-w64-mingw32-gcc ". mingw64-x86_64-gcc-g++ : 64-bit C++ compiler for native 64-bit 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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With