Ktam3874/pitx software guide, 2 cairo – Kontron KTAM3874-pITX User Manual
Page 144

KTD-S0057-I
Page 140 Linux® Programming Examples (DebianTM)
KTAM3874/pITX Software Guide
10.12.2 Cairo
Cairo designates a vector-based 2D graphics library and supports output to many different backends - also
named
surfaces
-, for example: X11
TM
, PDF, PostScript
®
and SVG files. On an x86 Desktop PC using a cross
compiler (Ubuntu
TM
environment) you need some additional libraries (application dependent):
cairo
expat
fontconfig
freetype
pixman-1
png12
pthread
X11
Xrender
m (libm)
z (libz)
All dynamic libraries are available within the standard Debian
TM
image (most of them in the directory
/usr/lib/arm-linux-gnueabihf
). The best way for development consists in the use of these libraries which
should be copied from the target hardware to the cross compiler environment.
Another possible option represents the download of
libcairo2-dev
(includes all necessary libraries, but only
as static version) on the target hardware with
sudo apt-get install libcairo2-dev
but this approach is not really recommended. For further steps see the chapter
Sound Programming with
ALSA
. Maybe a link creation or renaming of library files could be required. Please note that the
development libraries are not needed for the execution of Cairo applications on the target hardware
because the standard Debian
TM
image contains all necessary files.
ATTENTION
If you download the 'libcairo2-dev' environment on the target hardware
without special precautions the image will likely be corrupted. The integrated
files 'libcairo.so.2' and 'libcairo-gobject.so.2' are special versions and should
not be overwritten.
Without special precautions the following download message appears (extract):
The following extra packages will be installed:
binutils gcc gcc-4.6 libc-dev-bin libc6-dev libcairo-gobject2
libcairo-script-interpreter2 libcairo2 libelf1 libexpat1-dev
libfontconfig1-dev libfreetype6-dev libglib2.0-bin libglib2.0-dev libice-dev
libpcre3-dev libpcrecpp0 libpixman-1-dev libpng12-dev libpthread-stubs0
libpthread-stubs0-dev libsm-dev libx11-dev libx11-doc libxau-dev
libxcb-render0-dev libxcb-shm0-dev libxcb1-dev libxdmcp-dev libxrender-dev
linux-libc-dev manpages-dev x11proto-core-dev x11proto-input-dev
x11proto-kb-dev x11proto-render-dev xorg-sgml-doctools xtrans-dev zlib1g-dev
Suggested packages:
binutils-doc gcc-multilib make autoconf automake1.9 libtool flex bison gdb
gcc-doc libmudflap0-4.6-dev gcc-4.6-doc gcc-4.6-locales libgcc1-dbg
libgomp1-dbg libquadmath-dbg libmudflap0-dbg binutils-gold glibc-doc
libcairo2-doc libglib2.0-doc libice-doc libsm-doc libxcb-doc