[cairo] Private Headers
behdad at behdad.org
Thu Aug 21 10:12:22 PDT 2008
mike at liquido2.com wrote:
> I have a bit of a silly question. I recently ported cairo to an Amiga
> architecture. The library seems to build just fine. But when
> attempting to write a program using Cairo I getting a compiler error
> stating the struct _cairo is not defined in cairo.h.
> After some investigating, I see that this is true. struct _cairo is
> defined in cairo-private.h which is not included with cairo.h.
> I'm guessing the Cairo is using some type of library data
> encapsulation and that these private types are resolved at link- or
> run-time. Is this correct?
> If the above is correct, what can be done about systems with libraries
> that do not support structure definitions inside a library? Should I
> just include the appropriate private headers before cairo.h or is
> there a more elegant way?
What cairo does is very common and standard in C. The issue you are seeing
may merely be caused by a typo in your program. Are you writing:
when you should instead be writing:
Have fun with cairo!
> cairo mailing list
> cairo at cairographics.org
More information about the cairo