[cairo] Building pixman in Visual C++
elmar.braun at sh-p.de
Fri Nov 16 03:21:44 PST 2007
> platform, but I'm curious if anyone has successfully built Cairo 1.5.2
> on Visual C++ 2005. Specifically I'm having trouble building pixman
Yes, but I used a pixman from the git repository instead of the 0.9.6
release. I got that by typing this:
git clone git://anongit.freedesktop.org/git/pixman
> the code. The first problem seems to be due to the YV12_SETUP macro in
> pixman-compose.c. I'm not sure why, but if I manually expand the macro
> and replace it with its contents, everything is happy. However leaving
> the instances of that macro unmodified generate some strange undefined
That bug is unfortunately still in the version I got from git. The
problem is that the macro ends with a ';', but both uses of the macro
also append a ';', resulting in two successive ';' which throw MSVC off.
Just remove the ';' after both uses of YV12_SETUP and it works (see
Maybe someone on this list can commit that to the pixman git repository.
> type errors. The second thing I ran into I could only fix by disabling
> MMX in config.h It seems Visual C++ is not happy directly converting
The pixman from git comes with a "Makefile.win32" that does not use
either pixman-mmx.c or config.h. The resulting file pixman-1.lib is
still sufficient to build cairo 1.5.2.
However, I didn't find a MSVC makefile in the cairo 1.5.2 distribution,
so for me building 1.5.2 with MSVC required more manual labor. Also, the
resulting dll worked fine for screen output, but crashed very frequently
when using pdf output (in code that works fine with 1.4.10). I haven't
yet found the time to investigate that further.
You decide whether your needs justify the effort to build 1.5.2. If you
do it, and have an appropriate test case, please let me know how pdf
output works for you.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the cairo