[cairo] _cairo_win32_tmpfile()

Behdad Esfahbod behdad at behdad.org
Fri Sep 26 07:19:30 PDT 2008


Augusto Radtke wrote:
> Changing from water to wine, I'm facing a little problem when
> compiling cairo as a static library, on cairo.h:
> 
> #ifndef cairo_public
> # ifdef _MSC_VER
> #  define cairo_public __declspec(dllimport)
> # else
> #  define cairo_public
> # endif
> #endif
> 
> Shouldn't that be checking for CAIRO_WIN32_STATIC_BUILD instead of
> relying directly on _MSC_VER ? That seems to fix my compilation
> problems here.
> Comments?

That's indeed very untested.  You mean, if CAIRO_WIN32_STATIC_BUILD is defined
we should define cairo_public to nothing?  That makes sense, does this work
better:

#ifndef cairo_public
# if _MSC_VER && ! CAIRO_WIN32_STATIC_BUILD
#  define cairo_public __declspec(dllimport)
# else
#  define cairo_public
# endif
#endif

behdad

> Augusto
> 


More information about the cairo mailing list