Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb2aab42

Browse files
committed
Update MSVC build instructions.
Updated to reflect building with Visual Studio 2008, with just thePlatform SDK, and for 64-bit Windows.
1 parent491dd4a commitb2aab42

File tree

1 file changed

+125
-32
lines changed

1 file changed

+125
-32
lines changed

‎doc/src/sgml/install-win32.sgml

Lines changed: 125 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.54 2009/07/23 17:06:48 adunstan Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/install-win32.sgml,v 1.55 2010/01/12 20:13:32 mha Exp $ -->
22

33
<chapter id="install-win32">
44
<title>Installation from Source Code on <productname>Windows</productname></title>
@@ -10,19 +10,32 @@
1010

1111
<para>
1212
It is recommended that most users download the binary distribution for
13-
Windows, available as a<productname>Windows Installer</productname> package
13+
Windows, available as aone-click installer package
1414
from the <productname>PostgreSQL</productname> website. Building from source
1515
is only intended for people developing <productname>PostgreSQL</productname>
1616
or extensions.
1717
</para>
1818

1919
<para>
2020
There are several different ways of building PostgreSQL on
21-
<productname>Windows</productname>. The complete system can
22-
be built using <productname>MinGW</productname> or
23-
<productname>Visual C++ 2005</productname>. It can also be
24-
built for older versions of <productname>Windows</productname> using
25-
<productname>Cygwin</productname>. Finally, the client access library
21+
<productname>Windows</productname>. The simplest way to build with
22+
Microsoft tools is to intall a modern version of the
23+
<productname>Microsoft Platform SDK</productname> and use use the included
24+
compiler. It is also possible to build with the full
25+
<productname>Microsoft Visual C++ 2005 or 2008</productname>. In some cases
26+
that requires the installation of the <productname>Platform SDK</productname>
27+
in addition to the compiler.
28+
</para>
29+
30+
<para>
31+
It is also possible to build PostgreSQL using the GNU compiler tools
32+
provided by <productname>MinGW</productname>, or using
33+
<productname>Cygwin</productname> for older versions of
34+
<productname>Windows</productname>.
35+
</para>
36+
37+
<para>
38+
Finally, the client access library
2639
(<application>libpq</application>) can be built using
2740
<productname>Visual C++ 7.1</productname> or
2841
<productname>Borland C++</productname> for compatibility with statically
@@ -34,29 +47,69 @@
3447
<productname>Cygwin</productname> uses the normal build system, see
3548
<xref linkend="installation"> and the specific notes in
3649
<xref linkend="installation-notes-mingw"> and <xref linkend="installation-notes-cygwin">.
50+
These builds cannot generate 64-bit binaries.
3751
<productname>Cygwin</productname> is not recommended and should
3852
only be used for older versions of <productname>Windows</productname> where
3953
the native build does not work, such as
40-
<productname>Windows 98</productname>.
54+
<productname>Windows 98</productname>. <productname>MinGW</productname> is
55+
only recommended if you are building other modules using it. The official
56+
binaries are built using <productname>Visual Studio</productname>.
4157
</para>
4258

4359
<sect1 id="install-win32-full">
44-
<title>Building with <productname>Visual C++ 2005</productname></title>
60+
<title>Building with <productname>Visual C++</productname> or the
61+
<productname>Platform SDK</productname></title>
62+
63+
<para>
64+
PostgreSQL can be built using the Visual C++ compiler suite from Microsoft.
65+
These compilers can be either from <productname>Visual Studio</productname>,
66+
<productname>Visual Studio Express</productname> or recent versions of the
67+
<productname>Platform SDK</productname>. If you do not already have a
68+
<productname>Visual Studio</productname> environment set up, the easiest
69+
way us to use the compilers in the <productname>Platform SDK</productname>,
70+
which is a free download from Microsoft.
71+
</para>
4572

4673
<para>
47-
The tools for building using <productname>Visual C++ 2005</productname>,
74+
PostgreSQL supports the compilers from
75+
<productname>Visual Studio 2005</productname> and
76+
<productname>Visual Studio 2008</productname>. When using the Platform SDK
77+
only, or when building for 64-bit Windows, only
78+
<productname>Visual Studio 2008</productname> is supported.
79+
</para>
80+
81+
<para>
82+
The tools for building using <productname>Visual C++</productname>,
4883
are in the <filename>src/tools/msvc</filename> directory. When building,
4984
make sure there are no tools from <productname>MinGW</productname> or
5085
<productname>Cygwin</productname> present in your system PATH. Also, make
51-
sure you have all the required Visual C++ tools available in the PATH,
52-
usually by starting a <application>Visual Studio Command Prompt</application>
53-
and running the commands from there. All commands should be run from the
54-
<filename>src\tools\msvc</filename> directory.
86+
sure you have all the required Visual C++ tools available in the PATH. In
87+
<productname>Visual Studio</productname>, start the
88+
<application>Visual Studio Command Prompt</application>. In the
89+
<productname>Platform SDK</productname>, start the
90+
<application>CMD shell</application> listed under the SDK on the Start Menu.
91+
If you wish to build a 64-bit version, you must use the 64-bit version of
92+
the command, and vice versa.
93+
All commands should be run from the <filename>src\tools\msvc</filename>
94+
directory.
95+
</para>
96+
97+
<para>
98+
Before you build, you may need to edit the file <filename>config.pl</filename>
99+
to reflect any configuration options you want to change, or the paths to
100+
any third party libraries to use. The complete configuration is determined
101+
by first reading and parsing the file <filename>config_default.pl</filename>,
102+
and then apply any changes from <filename>config.pl</filename>. For example,
103+
to specify the location of your <productname>Python</productname> installation,
104+
put the following in <filename>config.pl</filename>:
105+
<screen>
106+
$config->{python} = 'c:\python26';
107+
</screen>
108+
You only need to specify those parameters that are different from what's in
109+
<filename>config_default.pl</filename>.
55110
</para>
56111

57112
<para>
58-
Before you build, edit the file <filename>config.pl</filename> to reflect the
59-
configuration options you want set, including the paths to libraries used.
60113
If you need to set any other environment variables, create a file called
61114
<filename>buildenv.pl</filename> and put the required commands there. For
62115
example, to add the path for bison when it's not in the PATH, create a file
@@ -69,14 +122,28 @@
69122
<sect2>
70123
<title>Requirements</title>
71124
<para>
72-
PostgreSQL will build using either the professional versions (any edition)
73-
or the free Express edition of
74-
<productname>Visual Studio 2005</productname>. The following additional products
75-
are required to build the complete package. Use the
125+
The following additional products are required to build
126+
<productname>PostgreSQL</productname>. Use the
76127
<filename>config.pl</filename> file to specify which directories the libraries
77128
are available in.
78129

79130
<variablelist>
131+
<varlistentry>
132+
<term><productname>Microsoft Platform SDK</productname></term>
133+
<listitem><para>
134+
It is recommended that you upgrade to the latest available version
135+
of the <productname>Microsoft Platform SDK</productname>, available
136+
for download from <ulink url="http://www.microsoft.com/downloads/"></>.
137+
</para>
138+
<para>
139+
You must always include the
140+
<application>Windows Headers and Libraries</application> part of the SDK.
141+
If you install the <productname>Platform SDK</productname>
142+
including the <application>Visual C++ Compilers</application>,
143+
you don't need <productname>Visual Studio</productname> to build.
144+
</para></listitem>
145+
</varlistentry>
146+
80147
<varlistentry>
81148
<term><productname>ActiveState Perl</productname></term>
82149
<listitem><para>
@@ -88,6 +155,15 @@
88155
</para></listitem>
89156
</varlistentry>
90157

158+
</variablelist>
159+
</para>
160+
<para>
161+
The following additional products are not required to get started,
162+
but are required to build the complete package. Use the
163+
<filename>config.pl</filename> file to specify which directories the libraries
164+
are available in.
165+
166+
<variablelist>
91167
<varlistentry>
92168
<term><productname>ActiveState TCL</productname></term>
93169
<listitem><para>
@@ -126,15 +202,6 @@
126202
</para></listitem>
127203
</varlistentry>
128204

129-
<varlistentry>
130-
<term><productname>Microsoft Platform SDK</productname></term>
131-
<listitem><para>
132-
It is recommended that you upgrade to the latest available version
133-
of the <productname>Microsoft Platform SDK</productname>, available
134-
for download from <ulink url="http://www.microsoft.com/downloads/"></>.
135-
</para></listitem>
136-
</varlistentry>
137-
138205
<varlistentry>
139206
<term><productname>MIT Kerberos</productname></term>
140207
<listitem><para>
@@ -194,6 +261,31 @@
194261
</para>
195262
</sect2>
196263

264+
<sect2>
265+
<title>Special considerations for 64-bit Windows</title>
266+
267+
<para>
268+
PostgreSQL will only build for the x64 architecture on 64-bit Windows, there
269+
is no support for Itanium processors.
270+
</para>
271+
272+
<para>
273+
Mixing 32- and 64-bit versions in the same build tree is not supported.
274+
The build system will automatically detect if it's running in a 32- or
275+
64-bit environment, and build PostgreSQL accordingly. For this reason, it
276+
is important to start the correct command prompt before building.
277+
</para>
278+
279+
<para>
280+
To use a server-side third party library such as <productname>python</> or
281+
<productname>openssl</>, this library <emphasis>must</emphasis> also be
282+
64-bit. There is no support for loading a 32-bit library in a 64-bit
283+
server. Several of the third party libraries that PostgreSQL supports may
284+
only be available in 32-bit versions, in which case they cannot be used with
285+
64-bit PostgreSQL.
286+
</para>
287+
</sect2>
288+
197289
<sect2>
198290
<title>Building</title>
199291

@@ -264,7 +356,7 @@
264356
required to initialize and use the database, run the command:
265357
<screen>
266358
<userinput>
267-
perlinstall.pl c:\destination\directory
359+
install c:\destination\directory
268360
</userinput>
269361
</screen>
270362
</para>
@@ -374,12 +466,13 @@
374466
<productname>Borland C++</productname></title>
375467

376468
<para>
377-
Using <productname>Visual C++ 7.1-8.0</productname> or
469+
Using <productname>Visual C++ 7.1-9.0</productname> or
378470
<productname>Borland C++</productname> to build libpq is only recommended
379471
if you need a version with different debug/release flags, or if you need a
380472
static library to link into an application. For normal use the
381473
<productname>MinGW</productname> or
382-
<productname>Visual Studio 2005</productname> version is recommended.
474+
<productname>Visual Studio</productname> or
475+
<productname>Platform SDK</productname> method is recommended.
383476
</para>
384477

385478
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp