PECL Cairo Extension

Windows Builds

NOTE: you need the same extension version (5.2.x or 5.3.0) as your PHP version, plus you need the same compiler version (only one compiler version is available for 5.2.x) plus you need the thread safe or non thread safe (NTS) version. All three - PHP version, compiler, and thread safety, must match or the extension will not load.

  1. PHP 5.2 NTS
  2. PHP 5.2
  3. VC6 PHP 5.3 NTS
  4. VC6 PHP 5.3
  5. VC9 PHP 5.3 NTS
  6. VC9 PHP 5.3
  7. VC9 PHP 5.3 NTS x64
  8. VC9 PHP 5.3 x64
  9. Tests and examples - includes batch file to quickly run test suite for PECL cairo

Cairo library builds are done with zlib and libpng supported. Win32 surfaces and fonts are enable, as well as SVG, PNG, PS, PDF, and IMAGE surfaces. The binaries used are the latest used by PHP on windows. zlib src can be found at http://www.zlib.net/. libpng src can be found at http://www.libpng.org/pub/png/libpng.html Project files for libpng and zlib can be found at pecl2 site although they are not always kept up to date. Binary builds for libpng and zlib with MSVC compatible dev files can be found at VC6, VC9, VC9-x64

The solution and dsp zip files below include cairo 1.8.8 source and pixman 0.14.0 along with the libpng and zlib static library builds - everything you need is included. There is one patch applied to both sets of source, and one patch applied only to the VC6 sources. The VC patch fixes a few build issues with VC6 (LL vs. i64) and the second patch fixes a bug in cairo_toy_font_face_create with a static build - thread stuff is not initialized before a lock is called.

I've been asked why don't I just use the build files provided with cairo. First, I don't like having to find a gnu make for windows - pure laziness on my part. Secondly the windows makefiles are NOT in any way synced with the source. And the reason I don't use mingw + msys to build VC6 compatible versions? Although dlls built that way are compatible with MSVC stuff, I've had less luck with static libraries.

Cairo Library Builds

  1. Cairo src can be found at http://cairographics.org/
  2. VC6 Workspace
  3. VC9 Solution and Projects
  4. VC6 cairo.dll
  5. VC9 x86 Binaries and Libs
  6. VC9 x64 Binaries and Libs
  7. Patch file for VC6 build issue (patch not submitted upstream)
  8. Patch file for thread not initialized crash (patch will be submitted upstream)