[cairo] cairo.h in /usr/include
otaylor at redhat.com
Tue Sep 7 10:51:05 PDT 2004
On Tue, 2004-09-07 at 13:29, Bill Spitzak wrote:
> It seems to me the only purpose of your suggestion is that you want to use
> the -I switch to the compiler to control which version is used. I'm not
> really thrilled with this idea.
> Mostly because it requires another -I switch even if I don't change the
To compile with Cairo, you are *required* to include whatever -I flags
pkg-config --cflags cairo outputs. On my system, thats:
$ pkg-config --cflags cairo
-I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/libpng12
it will be different on different systems. But if you don't include
them, cairo.h won't compile succesfully.
So, as an application programmer, you can't care what these cflags
are, and the only affect if -I/usr/include/cairo is added to that
is that your command lines get a little more cluttered.
> Also, if the interface is not compatable, I have to rewrite my program
> anyway, so I don't see what the difficulty is in changing the name of the
> include file at the same time.
Usually incompatible API changes only change a few symbols. It's also
pretty bad if I forget to change on of my source files, and it finds
the cairo 1 cairo.h but links against cairo 2...
> Also you could just change cairo.h to read:
> #ifdef CAIRO2
> #include "cairo2.h"
> #include "cairo1.h"
> /* the file cairo1.h contains the old cairo.h */
> And then use -DCAIRO2 instead of -I/usr/include/cairo2 as the compiler switch
> to get exactly the same result. I fail to see how this is any harder.
You have to change the installed cairo.h and move cairo.h to cairo1.h...
installing a new version generally shouldn't involve having
to change an existing installation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20040907/049c2fb6/attachment.pgp
More information about the cairo