Ensure HildonAppMenu size is correct after rotation
[hildon] / doc / compiling.sgml
1 <refentry id="hildon-compiling" revision="4 Feb 2001">
2 <refmeta>
3 <refentrytitle>Compiling Hildon Applications</refentrytitle>
4 <manvolnum>3</manvolnum>
5 <refmiscinfo>HILDON Library</refmiscinfo>
6 </refmeta>
7
8 <refnamediv>
9 <refname>Compiling Hildon Applications</refname>
10 <refpurpose>
11 How to compile your Hildon application
12 </refpurpose>
13 </refnamediv>
14
15 <refsect1>
16 <title>Compiling Hildon Applications on UNIX</title>
17
18 <para>
19 To compile a Hildon application, you need to tell the compiler where to
20 find the Hildon header files and libraries. This is done with the
21 <literal>pkg-config</literal> utility.
22 </para>
23 <para>
24 The following interactive shell session demonstrates how
25 <literal>pkg-config</literal> is used (the actual output on
26 your system may be different):
27 <programlisting>
28 $ pkg-config --cflags hildon-1
29 -DMAEMO_CHANGES -DMAEMO_GTK -I/usr/include/hildon-1 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
30 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/pixman-1
31 $ pkg-config --libs hildon-1
32 -lhildon-1 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
33 </programlisting>
34 </para>
35 <para>
36 The simplest way to compile a program is to use the "backticks"
37 feature of the shell. If you enclose a command in backticks
38 (<emphasis>not single quotes</emphasis>), then its output will be
39 substituted into the command line before execution. So, to compile
40 a Hildon Hello World you should type the following:
41 <programlisting>
42 $ cc `pkg-config --cflags --libs hildon-1` hello.c -o hello
43 </programlisting>
44 </para>
45
46 <para>
47 If you want to make sure that your program doesn't use any deprecated
48 functions, you can define the preprocessor symbol HILDON_DISABLE_DEPRECATED
49 by using the command line option <literal>-DHILDON_DISABLE_DEPRECATED=1</literal>.
50 </para>
51
52 </refsect1>
53 </refentry>