<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>I'm working a lot with Cairo and Quartz surfaces on MacOSX and decided to port one of my projects to iPhone as well. Version compiled for iPhone Simulator works perfect, but I'm now fighting with cross-compilation of Cairo library to armv7 and using iPhoneOS3.2.sdk ... anybody tried this already? Or is there any simplified way to achieve libcairo.a for armv7?</div><div><br></div><div>See below a script that tries to build it:</div><div><br></div><div>I'm also passing following to configure script "--enable-fc=no --enable-ft=no --enable-xlib=no" since I'm using CoreText directlry to display my texts, I'm just using Cairo as a wrapper for Quartz 2D.</div><div><br></div><div>#!/bin/sh</div><div><br></div><div><div># Select the desired iPhone SDK</div><div>export DEVROOT=/Developer/Platforms/iPhoneOS.platform/Developer</div><div>export SDKROOT=$DEVROOT/SDKs/iPhoneOS3.2.sdk</div><div><br></div><div># Set up relevant environment variables</div><div>export CPPFLAGS="-I$SDKROOT/usr/lib/gcc/arm-apple-darwin10/4.2.1/include/ -I$SDKROOT/usr/include/ -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/System/Library/Frameworks/"</div><div>export CFLAGS="$CPPFLAGS -arch armv7 -pipe -no-cpp-precomp -isysroot $SDKROOT"</div><div>export CPP="$DEVROOT/usr/bin/cpp $CPPFLAGS"</div><div>export CXXFLAGS="$CFLAGS"</div></div><div><br></div><div>LIBNAME="cairo"</div><div><br></div><div><div>./configure CXX=$DEVROOT/usr/bin/arm-apple-darwin10-g++-4.0.1 CC=$DEVROOT/usr/bin/arm-apple-darwin10-gcc-4.0.1 LD=$DEVROOT/usr/bin/ld --host=arm-apple-darwin $1 $2 $3 $4 $5 $6</div><div><br></div><div>make</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div>Configure will complain these:</div><div><br></div><div><div>checking ApplicationServices/ApplicationServices.h usability... no</div><div>checking ApplicationServices/ApplicationServices.h presence... no</div><div>checking for ApplicationServices/ApplicationServices.h... no</div><div>checking CoreGraphics/CoreGraphics.h usability... yes</div><div>checking CoreGraphics/CoreGraphics.h presence... no</div><div>configure: WARNING: CoreGraphics/CoreGraphics.h: accepted by the compiler, rejected by the preprocessor!</div><div>configure: WARNING: CoreGraphics/CoreGraphics.h: proceeding with the compiler's result</div><div>checking for CoreGraphics/CoreGraphics.h... yes</div><div>checking whether cairo's Quartz surface backend feature could be enabled... no (requires ApplicationServices framework)</div><div>checking for cairo's Quartz font backend feature...&nbsp;</div><div>checking whether cairo's Quartz font backend feature could be enabled... no (requires ApplicationServices framework)</div></div><div><br></div><div><br></div><div><br></div><div>Make will fail with following:</div><div><br></div><div><div>*** No native surface backends enabled for your platform. It is strongly</div><div>*** recommended that you enable the native surface backend feature for your</div><div>*** platform.</div><div><br></div><div>*** No native font backends enabled for your platform. It is strongly</div><div>*** recommended that you enable the native font backend feature for your</div><div>*** platform.</div></div><div><br></div><div>Then it fails with a lot of warnings and errors...</div><div><br><div>
<div style="font-size: 12px; ">---</div><div style="font-size: 12px; ">Pavel Kanzelsberger</div><div style="font-size: 12px; "><a href="http://www.kanzelsberger.com"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -khtml-text-decorations-in-effect: underline; "><span class="Apple-style-span" style="color: rgb(0, 0, 238); -khtml-text-decorations-in-effect: underline; ">http://www.kanzelsberger.com</span></span></a></div><div style="font-size: 12px; ">E-Mail: <a href="mailto:pavel@kanzelsberger.com">pavel@kanzelsberger.com</a></div><div style="font-size: 12px; ">Jabber: <a href="mailto:kanzelsberger@jabber.org">kanzelsberger@jabber.org</a>,&nbsp;ICQ: 20990633</div><br class="Apple-interchange-newline">
</div>
<br></div></body></html>