Debian Codegraph @

INSTALL

raw
1 Prerequisites
2 =============
3
4 - libodb http://www.codesynthesis.com/products/odb/
5 - libmysqlclient http://dev.mysql.com/downloads/mysql/
6
7
8 Building on UNIX
9 ================
10
11 The following build instructions are for the Linux/UNIX/Mac OS X
12 operating systems as well as for Cygwin and MinGW on Windows.
13
14 The standard autotools-based build system is used on these platforms.
15 After unpacking the source code archive, change to the libodb-mysql
16 package directory (referred to as libodb-mysql/ from now on) and run
17 the configure script:
18
19 ./configure
20
21 To see the available configuration options run configure with --help:
22
23 ./configure --help
24
25 The configure script expects the libodb and libmysqlclient headers
26 and libraries to be installed in a directory where the C++ compiler
27 and linker will search for them by default (normally /usr and
28 /usr/local). If these libraries are installed in other directories,
29 you can use the CPPFLAGS and LDFLAGS configure variables to specify
30 their locations, for example:
31
32 ./configure CPPFLAGS=-I/opt/libodb/include LDFLAGS=-L/opt/libodb/lib
33
34 If libodb is not installed and you would like to use its build
35 directory instead, you can use the --with-libodb configure option
36 to specify its location, for example:
37
38 ./configure --with-libodb=/tmp/libodb
39
40 As another example, the following configure command only builds shared
41 libraries, uses the specified C++ compiler, and compiles with optimization
42 and without debug information:
43
44 ./configure --disable-static CXX=g++-4.5 CXXFLAGS=-O3
45
46 Once configuration is complete, run make to build libodb-mysql:
47
48 make
49
50 Once the build is completed successfully, you can install the libodb-mysql
51 headers and libraries using the install target (you may need to do this
52 step as root depending on the installation directory):
53
54 make install
55
56
57 Building on Windows
58 ===================
59
60 The following build instructions are for Windows using Microsoft Visual
61 Studio. If you would like to build libodb-mysql with GCC either using
62 Cygwin or MinGW, refer to the "Building on UNIX" section above.
63
64 The standard Visual Studio project and solution files are used on this
65 platform. The provided project files expect the libodb and libmysqlclient
66 header and import library directories to be in the VC++ Directories
67 Include and Library search lists. For libodb, see the INSTALL file in
68 the package directory for more information on how to setup the VC++
69 Directories.
70
71 For libmysqlclient, add the include\ directory inside the MySQL package
72 to the Include search list and the lib\opt\ directory to the Library
73 search list.
74
75 To build libodb-mysql, unpack the source code archive and open the
76 libodb-mysql-vc<N>.sln file located in the libodb-mysql package
77 directory (referred to as libodb-mysql\ from now on). Here <N> is the
78 version of Visual Studio that you are using. Once the solution is open,
79 select the desired build configuration (Debug or Release) and platform
80 (Win32 or x64) and build the solution.
81
82 The resulting 32-bit DLLs and import libraries are placed into the
83 libodb-mysql\bin\ and libodb-mysql\lib\ directories, respectively.
84 Similarly, the 64-bit DLLs and import libraries are placed into
85 libodb-mysql\bin64\ and libodb-mysql\lib64\. The Release versions of
86 the import libraries are named odb-mysql.lib and the Debug versions
87 are named odb-mysql-d.lib.
88
89 To configure Visual Studio to automatically locate the libodb-mysql
90 headers, DLLs, and import libraries, add the following paths to your
91 VC++ Directories:
92
93 Win32:
94
95 Include: ...\libodb-mysql
96 Library: ...\libodb-mysql\lib
97 Executable: ...\libodb-mysql\bin
98
99 x64:
100
101 Include: ...\libodb-mysql
102 Library: ...\libodb-mysql\lib64
103 Executable: ...\libodb-mysql\bin64