<div dir="ltr"><div>Is there any reason why you need to build cairo instead of use your binaries and headers included in your Ubuntu distribution?<br>Possibly with the packaged version of Cairo you have enough to achieve what you want.<br>
</div>Cheers<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/1/14 peter shadbolt <span dir="ltr"><<a href="mailto:peter.shadbolt@gmail.com" target="_blank">peter.shadbolt@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div> </div><div>I'm struggling to get Cairo compiled on an ubuntu PC. Before I spend any more time on the make problems I wanted to ask if it's worth carrying on.</div>
<div> </div><div>
I have an existing program using an XLIB window and just want to display a PNG image (could be a BMP if that's easier) in the XLIB window. It looks like the Cairo functions make it easy to read a PNG file into a surface and then copy that to a XLib surface (or device - not quite sure about the terminology). </div>
<div> </div><div>Is this feasible or just not the right way to do it. I don;t want to spend another couple of hours getting cairo compiled to only find I can't use it to show an image file.</div><div><br>Many thanks</div>
<div> Shadsnz</div><div> </div><div>As an aside, here are the errors I'm getting with the make command:</div><div> </div><div>mike@mike-965GM-S2:~/Desktop/Peter/cairo/cairo-1.12.8$ make <br>make all-recursive<br>make[1]: Entering directory `/home/mike/Desktop/Peter/cairo/cairo-1.12.8'<br>
Making all in src<br>make[2]: Entering directory `/home/mike/Desktop/Peter/cairo/cairo-1.12.8/src'<br>make all-am<br>make[3]: Entering directory `/home/mike/Desktop/Peter/cairo/cairo-1.12.8/src'<br> CC cairo-xlib-display.lo<br>
In file included from cairo-xlib-private.h:41:0,<br> from cairo-xlib-display.c:40:<br>cairo-xlib-xrender-private.h:102:16: error: redefinition of 'struct _XLinearGradient'<br>/usr/include/X11/extensions/Xrender.h:186:16: note: originally defined here<br>
cairo-xlib-xrender-private.h:105:3: error: conflicting types for 'XLinearGradient'<br>/usr/include/X11/extensions/Xrender.h:189:3: note: previous declaration of 'XLinearGradient' was here<br>cairo-xlib-xrender-private.h:111:16: error: redefinition of 'struct _XCircle'<br>
/usr/include/X11/extensions/Xrender.h:146:16: note: originally defined here<br>cairo-xlib-xrender-private.h:115:3: error: conflicting types for 'XCircle'<br>/usr/include/X11/extensions/Xrender.h:150:3: note: previous declaration of 'XCircle' was here<br>
cairo-xlib-xrender-private.h:116:16: error: redefinition of 'struct _XRadialGradient'<br>/usr/include/X11/extensions/Xrender.h:191:16: note: originally defined here<br>cairo-xlib-xrender-private.h:119:3: error: conflicting types for 'XRadialGradient'<br>
/usr/include/X11/extensions/Xrender.h:194:3: note: previous declaration of 'XRadialGradient' was here<br>cairo-xlib-xrender-private.h:125:16: error: redefinition of 'struct _XConicalGradient'<br>/usr/include/X11/extensions/Xrender.h:196:16: note: originally defined here<br>
cairo-xlib-xrender-private.h:128:3: error: conflicting types for 'XConicalGradient'<br>/usr/include/X11/extensions/Xrender.h:199:3: note: previous declaration of 'XConicalGradient' was here<br>make[3]: *** [cairo-xlib-display.lo] Error 1<br>
make[3]: Leaving directory `/home/mike/Desktop/Peter/cairo/cairo-1.12.8/src'<br>make[2]: *** [all] Error 2<br>make[2]: Leaving directory `/home/mike/Desktop/Peter/cairo/cairo-1.12.8/src'<br>make[1]: *** [all-recursive] Error 1<br>
make[1]: Leaving directory `/home/mike/Desktop/Peter/cairo/cairo-1.12.8'<br>make: *** [all] Error 2</div></div>
<br>--<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a><br></blockquote></div><br><br clear="all"><br>-- <br>Carlos<br><a href="http://synfig.org" target="_blank">http://synfig.org</a><br>
</div>