1 <chapter id="installation">
2 <title>Installation</title>
4 You need a C++ compiler to compile and use YAZ++.
5 The software was implemented using <ulink url="&url.gcc;">GCC</ulink>
6 so we know that works well with YAZ++. From time to time the
7 software is compiled on Windows using Visual C++.
8 Other compilers should work too. Let us know of portability
9 problems, etc. with your system.
12 YAZ++ is built on top of the
13 <ulink url="&url.yaz;">YAZ</ulink>
15 You need to install that first.
16 For some platforms there are binary packages for YAZ.
19 <title>Installation on Unix (from source)</title>
20 <para>On UNIX, the software is compiled as follows:
29 You can supply options for the <literal>configure</literal> script.
30 The most useful ones are:
33 <term><literal>--prefix </literal>directory</term>
35 Specifies installation prefix. By default
36 <filename>/usr/local</filename> is used.
40 <term><literal>--with-yaz </literal>directory</term>
42 Specifies the location of <filename>yaz-config</filename>.
43 The <filename>yaz-config</filename> program is generated in
44 the source directory of YAZ as well as the binaries
45 directory when YAZ is installed (via make install).
48 If you don't supply this option, <literal>configure</literal> will
49 look for <filename>yaz-config</filename> in directories of the
50 <envar>PATH</envar> environment - which is nearly always
55 For the whole list of <literal>configure</literal> options, refer
57 <literal>./configure --help</literal>.
60 Configure uses GCC's C/C++ compiler if available. To specify another
61 compiler, set <literal>CXX</literal>. To use other compiler flags,
62 specify <literal>CXXFLAGS</literal>. To use <literal>CC</literal>
63 with debugging you could use:
65 CXXFLAGS="-g" CXX=CC ./configure
69 This is what you have after successful compilation:
72 <term><filename>src/libyazpp.la</filename></term>
75 This library gets installed in your libraries directory
76 (<parameter>prefix</parameter><filename>/lib</filename>).
81 <term><filename>src/libzoompp.la</filename></term>
83 The <link linkend="zoom">ZOOM-C++</link> library.
84 This library gets installed in your libraries directory
85 (<parameter>prefix</parameter><filename>/lib</filename>).
90 <term><filename>include/yazpp/*.h</filename></term>
92 Various C++ header files, which you'll need for YAZ++
93 development. All these are installed in your header files area
94 (<parameter>prefix</parameter><filename>/include/yazpp</filename>).
99 <term><filename>yazpp-config</filename></term>
101 A Bourne shell-script utility that returns the values of the
102 <envar>CFLAGS</envar> and <envar>LIBS</envar>
103 environment variables
104 needed in order to compile your applications with the YAZ++
105 library. This script gets installed in your binaries directory
106 (<parameter>prefix</parameter><filename>/bin</filename>).
111 <term><filename>zoom/zclient</filename></term>
113 ZOOM C++ demonstration client that uses the ZOOM C++ classes.
114 This client does not get installed in the system directories.
119 <term><filename>src/yaz-my-client</filename></term>
121 YAZ C++ demonstration client. This client does not
122 get installed in the system directories.
127 <term><filename>src/yaz-my-server</filename></term>
129 YAZ C++ demonstration server. This server does not
130 get installed in the system directories.
136 <section id="windows">
137 <title>Installation on Windows</title>
139 YAZ++ is shipped with "makefiles" for the NMAKE tool that comes
140 with <ulink url="&url.vstudio;">Microsoft Visual Studio</ulink>.
141 Version 2003 (7) and 2005 (8) has been tested.
142 We expect that YAZ++ compiles with versions 5 and 6 as well.
145 Start a command prompt and switch the sub directory
146 <filename>WIN</filename> where the file <filename>makefile</filename>
147 is located. Customize the installation by editing the
148 <filename>makefile</filename> file (for example by using notepad).
150 The following summarizes the most important settings in that file:
153 <varlistentry><term><literal>DEBUG</literal></term>
155 If set to 1, the software is
156 compiled with debugging libraries (code generation is
157 multi-threaded debug DLL).
158 If set to 0, the software is compiled with release libraries
159 (code generation is multi-threaded DLL).
162 <varlistentry><term><filename>YAZ_DIR</filename></term>
164 Specifies the directory of the YAZ source.
170 When satisfied with the settings in the makefile, type
177 If the <filename>nmake</filename> command is not found on your system
178 you probably haven't defined the environment variables required to
179 use that tool. To fix that, find and run the batch file
180 <filename>vcvars32.bat</filename>. You need to run it from within
181 the command prompt or set the environment variables "globally";
182 otherwise it doesn't work.
186 If you wish to recompile YAZ++ - for example if you modify
187 settings in the <filename>makefile</filename> you can delete
188 object files, etc by running.
194 The following files are generated upon successful compilation:
197 <varlistentry><term><filename>bin/yazpp_1.dll</filename></term>
199 YAZ++ DLL . Includes ZOOM C++ as well.
200 For the debug version <filename>lib/yazpp_1_d.dll</filename>
202 </para></listitem></varlistentry>
204 <varlistentry><term><filename>lib/yazpp_1.lib</filename></term>
206 Import library for <filename>yazpp_1.dll</filename>.
207 For the debug version <filename>lib/yazpp_1_d.lib</filename>
209 </para></listitem></varlistentry>
211 <varlistentry><term><filename>bin/yaz-my-client.exe</filename></term>
213 Z39.50 client demonstrating the YAZ++ API.
214 </para></listitem></varlistentry>
216 <varlistentry><term><filename>bin/yaz-my-server.exe</filename></term>
218 Z39.50 server demonstrating the YAZ++ API.
219 </para></listitem></varlistentry>
221 <varlistentry><term><filename>bin/zclient.exe</filename></term>
223 ZOOM C++ demo client. A simple WIN32 console application.
224 </para></listitem></varlistentry>
232 <!-- Keep this comment at the end of the file
237 sgml-minimize-attributes:nil
238 sgml-always-quote-attributes:t
241 sgml-parent-document: "yazpp.xml"
242 sgml-local-catalogs: nil
243 sgml-namecase-general:t