aboutsummaryrefslogtreecommitdiff
path: root/INSTALL
blob: 63fae3626ed4f5110636874329dbf5a638e021c3 (plain)
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
Prerequisites
=============

  - libodb           http://www.codesynthesis.com/products/odb/
  - libsqlite3       http://www.sqlite.org

If you plan to access an SQLite database from multiple threads, then you will
need SQLite version 3.5.0 or later built with the unlock notify feature
(SQLITE_ENABLE_UNLOCK_NOTIFY) enabled.

If you plant to use SQLite incremental BLOB/TEXT I/O support, then you will
need SQLite version 3.4.0 or later built with the column metadata functions
(SQLITE_ENABLE_COLUMN_METADATA) enabled.


Building on UNIX
================

The following build instructions are for the Linux/UNIX/Mac OS X
operating systems as well as for Cygwin and MinGW on Windows.

The standard autotools-based build system is used on these platforms.
After unpacking the source code archive, change to the libodb-sqlite
package directory (referred to as libodb-sqlite/ 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 libodb and libsqlite3 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 these libraries are installed in other directories,
you can use the CPPFLAGS and LDFLAGS configure variables to specify
their locations, for example:

./configure CPPFLAGS=-I/opt/libodb/include LDFLAGS=-L/opt/libodb/lib

If libodb is not installed and you would like to use its build
directory instead, you can use the --with-libodb configure option
to specify its location, for example:

./configure --with-libodb=/tmp/libodb

As another example, the following configure command only builds shared
libraries, uses the specified C++ compiler, and compiles with optimization
and without debug information:

./configure --disable-static CXX=g++-4.5 CXXFLAGS=-O3

Once configuration is complete, run make to build libodb-sqlite:

make

Once the build is completed successfully, you can install the libodb-sqlite
headers and libraries using the install target (you may need to do this
step as root depending on the installation directory):

make install


Building on Windows
===================

The following build instructions are for Windows using Microsoft Visual
Studio. If you would like to build libodb-sqlite with GCC either using
Cygwin or MinGW, refer to the "Building on UNIX" section above.

The standard Visual Studio project and solution files are used on this
platform. The provided project files expect the libodb and sqlite
header and import library directories to be in the VC++ Directories
Include and Library search lists. For libodb, see the INSTALL file in
the package directory for more information on how to setup the VC++
Directories.

The SQLite binary distribution for Windows contains only a 32-bit DLL
and it is built without unlock notify support. The provided libodb-
sqlite project files assume the unlock notify feature is available (you
can change this by manually removing the LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY
macro from the project's "Preprocessor Definitions" settings). The SQLite
source distribution for Windows lacks Visual Studio project/solution files.

To rectify this situation, the libodb-sqlite distribution includes, in the
etc\sqlite\ directory, Visual Studio 8, 9, 10, and 11 project/solution files
for building 32 and 64-bit SQLite libraries with unlock notify support.
Refer to the accompanying README file for information on how to build the
libraries and configure VC++ Directories to automatically locate them.

To build libodb-sqlite, unpack the source code archive and open the
libodb-sqlite-vc<N>.sln file located in the libodb-sqlite package
directory (referred to as libodb-sqlite\ from now on). Here <N> is the
version of Visual Studio that you are using. Once the solution is open,
select the desired build configuration (Debug or Release) and platform
(Win32 or x64) and build the solution.

The resulting 32-bit DLLs and import libraries are placed into the
libodb-sqlite\bin\ and libodb-sqlite\lib\ directories, respectively.
Similarly, the 64-bit DLLs and import libraries are placed into
libodb-sqlite\bin64\ and libodb-sqlite\lib64\. The Release versions of
the import libraries are named odb-sqlite.lib and the Debug versions
are named odb-sqlite-d.lib.

To configure Visual Studio to automatically locate the libodb-sqlite
headers, DLLs, and import libraries, add the following paths to your
VC++ Directories:

Win32:

  Include:    ...\libodb-sqlite
  Library:    ...\libodb-sqlite\lib
  Executable: ...\libodb-sqlite\bin

x64:

  Include:    ...\libodb-sqlite
  Library:    ...\libodb-sqlite\lib64
  Executable: ...\libodb-sqlite\bin64