I am trying to create cairo on Windows using MinGW (and MSYS). I follow the instructions on Compiling GTK + 2.16.4 for Windows , except that I use the latest versions when possible, for example:
- Zlib-1.2.3
- Libpng-1.2.42
- pixman-0.17.4
- cairo-1.8.8
This works very well until I try to build real Cairo. The configuration is successful, but during make, cairo seems to have problems with my build of libpng. After a while, I get a long list of errors, such as:
.libs / cairo-png.o: In function `png_simple_error_callback ':
/home/user/cairo-1.8.8/src/cairo-png.c:95: undefined reference to `png_get_error_ptr '
.libs / cairo-png.o: In function `png_simple_warning_callback ':
/home/user/cairo-1.8.8/src/cairo-png.c:112: undefined reference to `png_get_error_ptr '
...
.libs / cairo-png.o: In function `stream_read_func ':
/home/user/cairo-1.8.8/src/cairo-png.c:686: undefined reference to `png_error '
collect2: ld returned 1 exit status
make [3]: *** [libcairo.la] Error 1
make [3]: Leaving directory `/home/user/cairo-1.8.8/src '
make [2]: *** [all] Error 2
make [2]: Leaving directory `/home/user/cairo-1.8.8/src '
make [1]: *** [all-recursive] Error 1
make [1]: Leaving directory `/home/user/cairo-1.8.8 '
make: *** [all] Error 2
libpng (1.2.40, GTK +), . "pkg-config -cflags -libs libpng" , "-IC:/MinGW/include/libpng12 -LC:/MinGW/lib -lpng12" , . , - , , .