1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
Prerequisites
=============
- GNU g++ >= 4.5.0 http://gcc.gnu.org/
- libcutl http://www.codesynthesis.com/projects/libcutl/
ODB requires the GCC compiler (g++) to be built with plugin support.
If you are building GCC yourself, you can enable plugin support with
the --enable-plugin configure option. If you are using a pre-packaged
GCC (for example, as part of your distribution), then you can verify
that GCC was built with plugin support by running g++ with the -v
option and then making sure --enable-plugin is present in the output.
Note also that for pre-packaged GCC, plugin headers are usually
distributed in a separate package, normally called gcc-plugin-dev
or similar. You will need to install this package in order to build
ODB. For Debian/Ubuntu, this package is called gcc-X.Y-plugin-dev,
for example:
apt-get install gcc-4.7-plugin-dev
For RedHat/Fedora, this package is called gcc-plugin-devel, for
example:
yum install gcc-plugin-devel
Building on UNIX
================
The following build instructions are for the Linux/UNIX/Mac OS X
operating systems.
The standard autotools-based build system is used on these platforms.
After unpacking the source code archive, change to the odb package
directory (referred to as odb/ from now on) and run the configure
script:
./configure
To see the available configuration options run configure with --help:
./configure --help
The configure script expects the libcutl headers and libraries to be
installed in a directory where the C++ compiler and linker will search
for them by default (normally /usr and /usr/local). If libcutl is
installed in another directory, you can use the CPPFLAGS and LDFLAGS
configure variables to specify its location, for example:
./configure CPPFLAGS=-I/opt/libcutl/include LDFLAGS=-L/opt/libcutl/lib
If libcutl is not installed and you would like to use its build
directory instead, you can use the --with-libcutl configure option
to specify its location, for example:
./configure --with-libcutl=/tmp/libcutl
As another example, the following configure command uses the specified
GNU g++ compiler and compiles with optimization and without debug
information:
./configure CXX=g++-4.5 CXXFLAGS=-O3
Once configuration is complete, run make to build odb:
make
Once the build is completed successfully, you can install odb using the
install target (you may need to do this step as root depending on the
installation directory):
make install
Building on Windows
===================
Building odb on Windows involves a custom build procedure. Consider
using the pre-compiled binary distribution of odb for Windows or write
to odb-users@codesynthesis.com for more information.
|