1 <chapter id="installation">
2 <!-- $Id: installation.xml,v 1.15 2006-03-29 13:19:41 adam Exp $ -->
3 <title>Installation</title>
5 You need a C++ compiler to compile and use YAZ++.
6 The software was implemented using GCC so we know that works
7 well with YAZ++. From time to time the software has been
8 compiled on Windows using Visual C++. Other compilers should
9 work too. Let us know of portability problems, etc. with
13 YAZ++ is built on top of the
14 <ulink url="http://indexdata.dk/yaz/">YAZ</ulink>
16 You need to install that first.
17 For some platforms there are binary packages for YAZ.
20 <title>Building on Unix</title>
21 <para>On UNIX, the software is compiled as follows:
30 You can supply options for the <literal>configure</literal> script.
31 The most useful ones are:
34 <term><literal>--prefix </literal>directory</term>
36 Specifies installation prefix. By default
37 <literal>/usr/local</literal> is used.
41 <term><literal>--with-yaz </literal>directory</term>
43 Specifies the location of <filename>yaz-config</filename>.
44 The <filename>yaz-config</filename> program is generated in
45 the source directory of YAZ as well as the binaries
46 directory when YAZ is installed (via make install).
49 If you don't supply this option, <literal>configure</literal> will
50 look for <filename>yaz-config</filename> in directories of the
51 <envar>PATH</envar> environment - which is nearly always
56 For the whole list of <literal>configure</literal> options, refer
58 <literal>./configure --help</literal>.
61 Configure uses GCC's C/C++ compiler if available. To specify another
62 compiler, set <literal>CXX</literal>. To use other compiler flags,
63 specify <literal>CXXFLAGS</literal>. To use <literal>CC</literal>
64 with debugging you could use:
66 CXXFLAGS="-g" CXX=CC ./configure
70 This is what you have after successful compilation:
73 <term><literal>src/libyazpp.la</literal></term>
76 This library gets installed in your libraries directory
77 (<parameter>prefix</parameter><literal>/lib</literal>).
82 <term><literal>src/libzoompp.la</literal></term>
84 The <link linkend="zoom">ZOOM-C++</link> library.
85 This library gets installed in your libraries directory
86 (<parameter>prefix</parameter><literal>/lib</literal>).
91 <term><literal>include/yazpp/*.h</literal></term>
93 Various C++ header files, which you'll need for YAZ++
94 development. All these are installed in your header files area
95 (<parameter>prefix</parameter><literal>/include/yazpp</literal>).
100 <term><literal>yazpp-config</literal></term>
102 A Bourne shell-script utility that returns the values of the
103 <envar>CFLAGS</envar> and <envar>LIBS</envar>
104 environment variables
105 needed in order to compile your applications with the YAZ++
106 library. This script gets installed in your binaries directory
107 (<parameter>prefix</parameter><literal>/bin</literal>).
112 <term><literal>zoom/zclient</literal></term>
114 ZOOM C++ demonstration client that uses the ZOOM C++ classes.
115 This client does not get installed in the system directories.
120 <term><literal>src/yaz-my-client</literal></term>
122 YAZ C++ demonstration client. This client does not
123 get installed in the system directories.
128 <term><literal>src/yaz-my-server</literal></term>
130 YAZ C++ demonstration server. This server does not
131 get installed in the system directories.
137 <section id="windows">
138 <title>Building on Windows</title>
140 YAZ++ is shipped with "makefiles" for the NMAKE tool that comes
141 with <ulink url="http://msdn.microsoft.com/vstudio/">
142 Microsoft Visual Studio</ulink>.
143 Version 6 and .NET has been tested. We expect that YAZ++ compiles
144 with version 5 as well.
147 Start a command prompt and switch the sub directory
148 <filename>WIN</filename> where the file <filename>makefile</filename>
149 is located. Customize the installation by editing the
150 <filename>makefile</filename> file (for example by using notepad).
152 The following summarizes the most important settings in that file:
155 <varlistentry><term><literal>DEBUG</literal></term>
157 If set to 1, the software is
158 compiled with debugging libraries (code generation is
159 multi-threaded debug DLL).
160 If set to 0, the software is compiled with release libraries
161 (code generation is multi-threaded DLL).
164 <varlistentry><term><literal>YAZ_DIR</literal></term>
166 Specifies the directory of the YAZ source.
172 When satisfied with the settings in the makefile, type
179 If the <filename>nmake</filename> command is not found on your system
180 you probably haven't defined the environment variables required to
181 use that tool. To fix that, find and run the batch file
182 <filename>vcvars32.bat</filename>. You need to run it from within
183 the command prompt or set the environment variables "globally";
184 otherwise it doesn't work.
188 If you wish to recompile YAZ++ - for example if you modify
189 settings in the <filename>makefile</filename> you can delete
190 object files, etc by running.
196 The following files are generated upon successful compilation:
199 <varlistentry><term><filename>bin/yazpp.dll</filename></term>
201 YAZ++ DLL . Includes ZOOM C++ as well.
202 </para></listitem></varlistentry>
204 <varlistentry><term><filename>lib/yazpp.lib</filename></term>
206 Import library for <filename>yazpp.dll</filename>.
207 </para></listitem></varlistentry>
209 <varlistentry><term><filename>bin/zclient.exe</filename></term>
211 ZOOM C++ demo client. A simple WIN32 console application.
212 </para></listitem></varlistentry>
220 <!-- Keep this comment at the end of the file
225 sgml-minimize-attributes:nil
226 sgml-always-quote-attributes:t
229 sgml-parent-document: "yazpp.xml"
230 sgml-local-catalogs: nil
231 sgml-namecase-general:t