[cairo] cairomm 1.6.0 fails with cairo 1.6.4 + quartz on Mac OS X

Bill Spitzak spitzak at thefoundry.co.uk
Fri Apr 25 18:51:50 PDT 2008


Benjamin Reed wrote:
> On Fri, Apr 25, 2008 at 11:13 AM, Vladimir Vukicevic <vladimir at pobox.com> wrote:
> 
>>  Yep, X tends to #define lots of very generic things (like "Status" or
>> "Picture") which causes breakage if they're used in pretty much any context
>> (e.g. C++ member function name, enum value, parameter name, etc.).  In
>> general, a file that includes X libs shouldn't include anything from any
>> other platform, or pain will result.  You can try #undef'ing all the bits
>> that it's complaining about..
> 
> Yeah, I've tried #undef'ing everything I could, but it still freaks
> out.  The "Cursor" one is a typedef/struct conflict.
> 
> /usr/X11R6/include/X11/X.h:typedef XID Cursor;
> /System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QuickdrawTypes.h:struct
> Cursor {

I worked around this is some pretty ugly ways. For instance I had an 
object called "Window" and this was the only way to make the code in X 
work at the same time:

#define Window XWindow
#include <X.h>
#undef Window
... now use XWindow for the type of any X window id.


More information about the cairo mailing list