[cairo] cairo compiles on win32 (cygwin)
Andrew Johnson
acjgenius at earthlink.net
Fri Jan 23 08:26:37 PST 2004
On Fri, 2004-01-23 at 08:40, Richard Worth wrote:
> Evan Martin wrote:
> If someone were to compile in some other win32 environment (not
> unreasonable) it may turn out that it is necessary. I would feel better
> about them adding it for that reason. Until then the code is a lot
> easier to read.
I just tried compiling in mingw, and had issues with this, also an
additional problem I had was with M_PI apparently not being defined in
math.h which is very odd indeed but was easily fixed by adding an
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
to the cairoint.h
To get the linking working at least enough to do a basic test I
essentially looked at how glib handled this, and in cairoint.h added -
#define CAIRO_IMPORT extern
#if defined(WIN32)
# define CAIRO_EXPORT __declspec(dllexport)
#else
# define CAIRO_EXPORT
#endif
and simply prepended CAIRO_EXPORT to all relevent functions in cairo,
cairo_matrix and cairo_surface. After doing which, I could manually
compile the png cairo demos(the makefile does not work properly)
of course the resulting png's are corrupt, but that is probably another
issue entirely...
Andrew
More information about the cairo
mailing list