1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>3. WIN32</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="YAZ User's Guide and Reference"><link rel="up" href="installation.html" title="Chapter 2. Compilation and Installation"><link rel="prev" href="installation.unix.html" title="2. UNIX"><link rel="next" href="zoom.html" title="Chapter 3. ZOOM"></head><body><link rel="stylesheet" type="text/css" href="common/style1.css"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">3. WIN32</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="installation.unix.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Compilation and Installation</th><td width="20%" align="right"> <a accesskey="n" href="zoom.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="installation.win32"></a>3. WIN32</h2></div></div></div><p>The easiest way to install YAZ on Windows is by downloading
3 <a class="ulink" href="http://ftp.indexdata.com/pub/yaz/win32/" target="_top">here</a>.
4 The installer comes with source too - in case you wish to
5 compile YAZ with different Compiler options etc.
6 </p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="installation.win32.source"></a>3.1. Compiling from Source on WIN32</h3></div></div></div><p>
7 YAZ is shipped with "makefiles" for the NMAKE tool that comes
8 with <a class="ulink" href="http://msdn.microsoft.com/vstudio/" target="_top">
9 Microsoft Visual Studio</a>.
10 Version 6 and .NET has been tested. We expect that YAZ compiles
11 with version 5 as well.
13 Start a command prompt and switch the sub directory
14 <code class="filename">WIN</code> where the file <code class="filename">makefile</code>
15 is located. Customize the installation by editing the
16 <code class="filename">makefile</code> file (for example by using notepad).
18 The following summarizes the most important settings in that file:
20 </p><div class="variablelist"><dl><dt><span class="term"><code class="literal">DEBUG</code></span></dt><dd><p>
21 If set to 1, the software is
22 compiled with debugging libraries (code generation is
23 multi-threaded debug DLL).
24 If set to 0, the software is compiled with release libraries
25 (code generation is multi-threaded DLL).
26 </p></dd><dt><span class="term"><code class="literal">HAVE_TCL</code>, <code class="literal">TCL</code></span></dt><dd><p>
27 If <code class="literal">HAVE_TCL</code> is set to 1, nmake will
28 use the ASN.1 compiler (Tcl based). You must set
29 <code class="literal">TCL</code> to the full path of the Tcl
32 If you do not have Tcl installed, set
33 <code class="literal">HAVE_TCL</code> to 0.
34 </p></dd><dt><span class="term"><code class="literal">HAVE_BISON</code>,
35 <code class="literal">BISON</code></span></dt><dd><p>
36 If GNU Bison is present, you might set <code class="literal">HAVE_ICONV</code>
37 to 1 and specify the Bison executable in <code class="literal">BISON</code>.
38 Bison is only required if you use the CVS version of
39 YAZ or if you modify the grammar for CQL
40 (<code class="filename">cql.y</code>).
42 A Windows version of GNU Bison is part of
43 <a class="ulink" href="http://unxutils.sourceforge.net/" target="_top">unxutils</a>.
44 </p></dd><dt><span class="term"><code class="literal">HAVE_ICONV</code>,
45 <code class="literal">ICONV_DIR</code></span></dt><dd><p>
46 If <code class="literal">HAVE_ICONV</code> is set to 1, YAZ is compiled
47 with iconv support. In this configuration, set
48 <code class="literal">ICONV_DIR</code> to the iconv source directory.
49 </p></dd><dt><span class="term"><code class="literal">HAVE_LIBXML2</code>,
50 <code class="literal">LIBXML2_DIR</code></span></dt><dd><p>
51 If <code class="literal">HAVE_LIBXML2</code> is set to 1, YAZ is compiled
52 with SRU support. In this configuration, set
53 <code class="literal">LIBXML2_DIR</code> to the
54 <a class="ulink" href="http://xmlsoft.org/" target="_top">libxml2</a> source directory
56 <code class="literal">ZLIB_DIR</code> to the zlib directory.
58 Windows versions of libxslt, libxml2, zlib and iconv can be found
59 <a class="ulink" href="http://www.zlatkovic.com/libxml.en.html" target="_top">
60 Igor Zlatković' site</a>.
61 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
62 YAZ is not using zlib but libxml2 is depending on it.
63 </p></div></dd><dt><span class="term"><code class="literal">HAVE_LIBXSLT</code>,
64 <code class="literal">LIBXSLT_DIR</code></span></dt><dd><p>
65 If <code class="literal">HAVE_LIBXSLT</code> is set to 1, YAZ is compiled
66 with XSLT support. In this configuration, set
67 <code class="literal">LIBXSLT_DIR</code> to the
68 <a class="ulink" href="http://xmlsoft.org/XSLT/" target="_top">libxslt</a> source directory.
69 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
70 libxslt depends libxml2.
71 </p></div></dd></dl></div><p>
73 When satisfied with the settings in the makefile, type
74 </p><pre class="screen">
77 </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
78 If the <code class="filename">nmake</code> command is not found on your system
79 you probably haven't defined the environment variables required to
80 use that tool. To fix that, find and run the batch file
81 <code class="filename">vcvars32.bat</code>. You need to run it from within
82 the command prompt or set the environment variables "globally";
83 otherwise it doesn't work.
85 If you wish to recompile YAZ - for example if you modify
86 settings in the <code class="filename">makefile</code> you can delete
87 object files, etc by running.
88 </p><pre class="screen">
92 The following files are generated upon successful compilation:
94 </p><div class="variablelist"><dl><dt><span class="term"><code class="filename">bin/yaz3.dll</code></span></dt><dd><p>
95 YAZ release mode multi-threaded Dynamic Link Library.
96 </p></dd><dt><span class="term"><code class="filename">lib/yaz3.lib</code></span></dt><dd><p>
97 Import library for <code class="filename">yaz3.dll</code>.
98 </p></dd><dt><span class="term"><code class="filename">bin/yaz3d.dll</code></span></dt><dd><p>
99 YAZ debug mode multi-threaded Dynamic Link Library.
100 </p></dd><dt><span class="term"><code class="filename">lib/yaz3d.lib</code></span></dt><dd><p>
101 Import library for <code class="filename">yaz3d.dll</code>.
102 </p></dd><dt><span class="term"><code class="filename">bin/yaz-client.exe</code></span></dt><dd><p>
103 YAZ Z39.50 client application. It's a WIN32 console application.
104 See chapter <a class="link" href="client.html" title="Chapter 5. The YAZ client">YAZ client</a> for more
106 </p></dd><dt><span class="term"><code class="filename">bin/yaz-ztest.exe</code></span></dt><dd><p>
107 Z39.50 multi-threaded test/example server. It's a WIN32
109 </p></dd><dt><span class="term"><code class="filename">bin/zoomsh.exe</code></span></dt><dd><p>
110 Simple console application implemented on top of the
111 <a class="link" href="zoom.html" title="Chapter 3. ZOOM">ZOOM</a> functions.
112 The application is a command line shell that allows you to enter
113 simple commands to perform ZOOM operations.
114 </p></dd><dt><span class="term"><code class="filename">bin/zoomtst1.exe</code>,
115 <code class="filename">bin/zoomtst2.exe</code>, ..</span></dt><dd><p>
116 Several small applications that demonstrates the ZOOM API.
117 </p></dd></dl></div><p>
119 </p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="installation-linking-yaz-win32"></a>3.2. How to make apps using YAZ on WIN32</h3></div></div></div><p>
120 This section will go though the process of linking your WIN32
121 applications with YAZ.
123 Some people are confused by the fact that we use the nmake
124 tool to build YAZ. They think they have to do that too - in order
125 to make their WIN32 applications work with YAZ. The good news is that
126 you don't have to. You can use the integrated environment of
127 Visual Studio if desired for your own application.
129 When setting up a project or Makefile you have to set the following:
130 </p><div class="variablelist"><dl><dt><span class="term">include path</span></dt><dd><p>
131 Set it to the <code class="filename">include</code> directory of YAZ.
132 </p></dd><dt><span class="term">import library <code class="filename">yaz3.lib</code>
134 You must link with this library. It's located in the
135 sub directory <code class="filename">lib</code> of YAZ.
136 If you want to link with the debug version of YAZ, you must
137 link against <code class="filename">yaz3d.lib</code> instead.
138 </p></dd><dt><span class="term">dynamic link library <code class="filename">yaz3.dll</code>
140 This DLL must be in your execution path when you invoke
141 your application. Specifically, you should distribute this
142 DLL with your application.
143 </p></dd></dl></div><p>
144 </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="installation.unix.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="installation.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="zoom.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2. UNIX </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 3. ZOOM</td></tr></table></div></body></html>