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