I think cairo git sources are a bit broken, at least for win32.<br><br>The first problem is the use of ffs(). Apparently this is a POSIX function that mingw doesn't include support for. (See <a href="http://www.nabble.com/undefined-reference-to-%60ffs%27-when-using--O0-td21607092.html" target="_blank">http://www.nabble.com/undefined-reference-to-%60ffs%27-when-using--O0-td21607092.html</a> for a conversation about this problem.) I believe the official position is that it is best for each project to define its own implementation; alternatively, for GCC, one can add -D ffs=__builtin_ffs to CFLAGS. That worked for me.<br>
<br>
cairo-win32-surface appears to be missing #include "cairo-surface-fallback-private.h", resulting in a compiler error about _cairo_surface_fallback_composite.<br><br>cairo-script-private.h has some rather unhygienic macros for bswap_16() and friends (which are used only on platforms like mingw which lack glibc's byteswap.h). Of note, the macro includes a trailing semicolon, which causes the following error (and many similar).<br>
cairo-script-scanner.c: In function '_scan_file':<br> cairo-script-scanner.c:791: error: expected ')' before ';' token<br><br>It's probably preferable (and much easier foor poor schmucks like me
to debug!) to use inline functions, like the cygwin headers do:
<a href="http://cygwin.com/cgi-bin/cvsweb.cgi/~checkout~/src/winsup/cygwin/include/byteswap.h?rev=1.1&content-type=text/plain&cvsroot=src">http://cygwin.com/cgi-bin/cvsweb.cgi/~checkout~/src/winsup/cygwin/include/byteswap.h?rev=1.1&content-type=text/plain&cvsroot=src</a><br>
<br>Fixing these makes cairo build, although I'm having shared library problems that are almost certainly of my own creation. (Sorry these aren't patches!)<br><br>Damian<br><br>