1
by Matthias Klose
Import upstream version 2.2.1 |
1 |
Installing and compiling your programs |
2 |
======================================
|
|
3 |
||
4 |
If you have a previous version of GtkAda on your system, we recommend that |
|
1.1.3
by Ludovic Brenta
Import upstream version 2.12.0 |
5 |
you move/remove it using e.g. the following command: |
1
by Matthias Klose
Import upstream version 2.2.1 |
6 |
|
1.1.3
by Ludovic Brenta
Import upstream version 2.12.0 |
7 |
$ mv <prefix>/include/gtkada <prefix/include/gtkada.old |
1
by Matthias Klose
Import upstream version 2.2.1 |
8 |
|
9 |
where <prefix> is the prefix you used to configure GtkAda the first time. |
|
1.1.3
by Ludovic Brenta
Import upstream version 2.12.0 |
10 |
The default prefix is /usr/local. If you don't have the rights to move |
1
by Matthias Klose
Import upstream version 2.2.1 |
11 |
these files, then you should at least make sure that your ADA_INCLUDE_PATH
|
12 |
and your ADA_OBJECTS_PATH don't include this directory before building GtkAda. |
|
13 |
||
14 |
To install GtkAda, you first need to install GNU make, glib, pango, atk and |
|
15 |
gtk+, then do the following: |
|
16 |
||
17 |
If you are under Windows, you need to use GCC 3.2 (or later) to build the |
|
1.1.1
by Ludovic Brenta
Import upstream version 2.4.0 |
18 |
C files, and a unix-like environment (e.g. cygwin or msys) where the paths |
19 |
correspond to real Windows path (for instance by installing cygwin under |
|
20 |
the root directory). You can use an older GCC version for the Ada files |
|
21 |
(gnatmake). Under sh: |
|
1.1.3
by Ludovic Brenta
Import upstream version 2.12.0 |
22 |
$ (cd src; patch -p0 < ../contrib/gtkada-2.10-win32.diff) |
1
by Matthias Klose
Import upstream version 2.2.1 |
23 |
$ CC='gcc-3.2 -mms-bitfields' ./configure --prefix=<install_dir> \ |
24 |
--build=i386-pc-mingw32
|
|
1.1.3
by Ludovic Brenta
Import upstream version 2.12.0 |
25 |
$ make |
1
by Matthias Klose
Import upstream version 2.2.1 |
26 |
$ make install |
27 |
||
28 |
On others platforms: |
|
29 |
$ ./configure --prefix=<install_dir> |
|
1.1.3
by Ludovic Brenta
Import upstream version 2.12.0 |
30 |
$ make |
1
by Matthias Klose
Import upstream version 2.2.1 |
31 |
$ make install |
32 |
||
33 |
This will create (and install) the GtkAda library and then compile the |
|
34 |
testgtk example. |
|
35 |
||
36 |
Note that you might have to be root to install GtkAda on your system. |
|
37 |
||
38 |
You should also modify your PATH variable to include the installation |
|
39 |
directory, or copy the gtkada-config script somewhere in your path |
|
40 |
||
41 |
$ setenv PATH <installation_directory>:$PATH |
|
42 |
or
|
|
43 |
$ export PATH=<installation_directory>:$PATH |
|
44 |
||
1.1.1
by Ludovic Brenta
Import upstream version 2.4.0 |
45 |
Finally, update your LD_LIBRARY_PATH variable to include the <prefix>/lib |
1
by Matthias Klose
Import upstream version 2.2.1 |
46 |
directory, so that the linker can find the libraries. The other |
1.1.1
by Ludovic Brenta
Import upstream version 2.4.0 |
47 |
alternative under GNU/Linux if you have root priviledges is to add this |
48 |
'prefix/lib' directory added in /etc/ld.conf and then run ldconfig. |
|
49 |
||
1
by Matthias Klose
Import upstream version 2.2.1 |
50 |
Then, when you want to compile your application, simply use the |
51 |
gtkada-config script: |
|
52 |
||
53 |
$ gnatmake <your_application> <your_switches> `gtkada-config` |
|
54 |
||
55 |
This will automatically submit the correct paths to gnatmake so that |
|
56 |
the gtk and gtkada libraries are found. |
|
1.1.2
by Ludovic Brenta
Import upstream version 2.8.1 |
57 |