xref: /aoo4110/main/mysqlc/source/README (revision b1cdbd2c)
1 ---------- Status -------------------------------------------------------------
2 
3 The code is on a PREVIEW level. PREVIEW means pre-alpha.
4 
5 ---------- Requirements -------------------------------------------------------
6 
7 The MySQL driver for OpenOffice.org (MySQL Connector/OpenOffice.org - C/OOo)
8 requires two external libraries to be build:
9 
10  1) The MySQL Client Library (libmysql)
11  2) The MySQL Connector/C++ Library (libmysqlcppcon)
12 
13 At the time of writing neither of the two libraries are part of the CWS!
14 Before you can build the MySQL driver for OpenOffice.org you must install
15 the two required libraries on your system before you can compile the driver.
16 
17 You need the two libraries because the MySQL driver for OpenOffice.org
18 does not feature an implementation of the MySQL Client Server
19 communication protocol. The protocol implementation is part of the MySQL
20 Client Library. And the SDBC(X) style OpenOffice.org driver is implemented as a
21 wrapper of the MySQL Connector/C++ Library which implements a JDBC interface and
22 in turn uses the C based MySQL Client Library.
23 
24 1) MySQL Client Library (libmysql)
25 
26 The MySQL Client Library (libmysql) is part of the MySQL Server. You need to
27 download and install the MySQL Server. Use a binary distribution of
28 MySQL 5.0.x or MySQL 5.1.x. Check the MySQL manual for instructions, e.g.
29 for Unix:
30 
31  http://dev.mysql.com/doc/refman/5.1/en/installing-binary.html
32 
33 The typical installation path of the libmysql.so on Unix is
34 /usr/local/mysql/lib/mysql/ .
35 
36 2) MySQL Connector/C++ (libmysqlcppcon)
37 
38 Download and install the latest version of the MySQL Connector/C++, see
39 http://forge.mysql.com/wiki/Connector_C++ . Check out the source
40 from the bzr repository.
41 
42 3) Tweaking library paths
43 
44 At the time of writing you might have to *manually* tweak library paths and
45 library names by patching makefile.mk. This is a temporary hack. The makefile
46 will be improved later.
47 
48 However, for the moment check the makefile.mk if the compilation fails due to
49 "missing" libraries (= libraries not found). For example, check the following
50 settings:
51 
52   MYSQL_INCDIR=/usr/local/include
53   MYSQL_LIBDIR=/usr/local/lib
54   [...]
55   MYSQL_INCDIR=/usr/local/include
56   MYSQL_LIBDIR=/usr/local/lib
57   [...]
58   MYSQL_INC=-I$(MYSQL_INCDIR)
59   MYSQL_LIB=-L$(MYSQL_LIBDIR) -lmysqlclient -rdynamic -lz -lcrypt -lnsl -lm
60   MYSQL_LIBFILE=$(MYSQL_LIBDIR)$/libmysqlclient.so.16
61   MYSQL_CPPCONN_LIBFILE=$(MYSQL_LIBDIR)$/libmysqlcppconn.so
62   [...]
63 
64 A common issue is libmysqlclient.so.15 vs. libmysqlclient.so.16 .
65 
66