install-win32.sgml 3.79 KB
Newer Older
Peter Eisentraut's avatar
Peter Eisentraut committed
1 2
<chapter id="install-win32">
 <title>Installation on <productname>Windows</productname></title>
3

4 5 6 7 8
 <indexterm>
  <primary>installation</primary>
  <secondary>on Windows</secondary>
 </indexterm>

Peter Eisentraut's avatar
Peter Eisentraut committed
9 10 11 12 13 14 15
 <abstract>
  <para>
   Build, installation, and use instructions for
   <productname>PostgreSQL</productname> client libraries on
   <productname>Windows</productname>
  </para>
 </abstract>
16

Peter Eisentraut's avatar
Peter Eisentraut committed
17 18 19 20 21 22 23 24 25 26
 <para>
  Although <productname>PostgreSQL</productname> is written for
  Unix-like operating systems, the C client library
  (<application>libpq</application>) and the interactive terminal
  (<application>psql</application>) can be compiled natively under
  Windows.  The makefiles included in the source distribution are
  written for <productname>Microsoft Visual C++</productname> and will
  probably not work with other systems.  It should be possible to
  compile the libaries manually in other cases.
 </para>
27

Peter Eisentraut's avatar
Peter Eisentraut committed
28 29 30 31 32 33 34 35
 <tip>
  <para>
   If you are using Windows NT/2000 you can build and use all of
   <productname>PostgreSQL</productname> <quote>the Unix way</quote>
   if you install the <productname>Cygwin</productname> toolkit first.
   In that case see <xref linkend="installation">.
  </para>
 </tip>
36

Peter Eisentraut's avatar
Peter Eisentraut committed
37 38 39 40 41 42 43 44 45 46
 <para>
  To build everything that you can on
  <productname>Windows</productname>, change into the
  <filename>src</filename> directory and type the command
<screen>
<userinput>nmake /f win32.mak</userinput>
</screen>
  This assumes that you have <productname>Visual C++</productname> in
  your path.
 </para>
47

Peter Eisentraut's avatar
Peter Eisentraut committed
48 49
 <para>
  The following files will be built:
50

Peter Eisentraut's avatar
Peter Eisentraut committed
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
  <variablelist>
   <varlistentry>
    <term><filename>interfaces\libpq\Release\libpq.dll</filename></term>
    <listitem>
     <para>
      The dynamically linkable frontend library
     </para>
    </listitem>
   </varlistentry>
  
   <varlistentry>
    <term><filename>interfaces\libpq\Release\libpqdll.lib</filename></term>
    <listitem>
     <para>
      Import library to link your program to <filename>libpq.dll</filename>
     </para>
    </listitem>
   </varlistentry>
69

Peter Eisentraut's avatar
Peter Eisentraut committed
70 71 72 73 74 75 76 77
   <varlistentry>
    <term><filename>interfaces\libpq\Release\libpq.lib</filename></term>
    <listitem>
     <para>
      Static library version of the frontend library
     </para>
    </listitem>
   </varlistentry>
78

Peter Eisentraut's avatar
Peter Eisentraut committed
79 80 81 82 83 84 85 86 87 88
   <varlistentry>
    <term><filename>bin\psql\Release\psql.exe</filename></term>
    <listitem>
     <para>
      The <productname>PostgreSQL</productname> interactive terminal
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
 </para>
89

Peter Eisentraut's avatar
Peter Eisentraut committed
90 91 92 93 94 95 96 97 98 99
 <para>
  The only file that really needs to be installed is the
  <filename>libpq.dll</filename> library.  This file should in most
  cases be placed in the <filename>WINNT\SYSTEM32</filename> directory
  (or in <filename>WINDOWS\SYSTEM</filename> on a Windows 95/98/ME
  system).  If this file is installed using a setup program, it should
  be installed with version checking using the
  <symbol>VERSIONINFO</symbol> resource included in the file, to
  ensure that a newer version of the library is not overwritten.
 </para>
100

Peter Eisentraut's avatar
Peter Eisentraut committed
101 102 103 104 105 106
 <para>
  If you plan to do development using libpq on this machine, you will
  have to add the <filename>src\include</filename> and
  <filename>src\interfaces\libpq</filename> subdirectories of the
  source tree to the include path in your compilers settings.
 </para>
107

Peter Eisentraut's avatar
Peter Eisentraut committed
108 109 110 111 112
 <para>
  To use the libraries, you must add the
  <filename>libpqdll.lib</filename> file to your project.  (In Visual
  C++, just right-click on the project and chose to add it.)
 </para>
113

Peter Eisentraut's avatar
Peter Eisentraut committed
114
</chapter>
115 116 117

<!-- Keep this comment at the end of the file
Local variables:
118
mode:sgml
119 120 121 122 123 124 125 126 127
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"./reference.ced"
sgml-exposed-tags:nil
128
sgml-local-catalogs:("/usr/lib/sgml/catalog")
129 130 131
sgml-local-ecat-files:nil
End:
-->