Chapter 16. Installation from Source Code onWindows
Table of Contents
It is recommended that most users download the binary distribution for Windows, available as a graphical installer package from thePostgres Pro website. Building from source is only intended for people developingPostgres Pro or extensions.
There are several different ways of building Postgres Pro onWindows. The simplest way to build with Microsoft tools is to installVisual Studio 2019 and use the included compiler. It is also possible to build with the fullMicrosoft Visual C++ 2005 to 2019. In some cases that requires the installation of theWindows SDK in addition to the compiler.
It is also possible to build Postgres Pro using the GNU compiler tools provided byMinGW, or usingCygwin for older versions ofWindows.
Finally, the client access library (libpq) can be built usingVisual C++ 7.1 orBorland C++ for compatibility with statically linked applications built using these tools.
Building usingMinGW orCygwin uses the normal build system, seeChapter 15 and the specific notes inSection 15.7.5 andSection 15.7.2. To produce native 64 bit binaries in these environments, use the tools fromMinGW-w64. These tools can also be used to cross-compile for 32 bit and 64 bitWindows targets on other hosts, such asLinux andDarwin.Cygwin is not recommended for running a production server, and it should only be used for running on older versions ofWindows where the native build does not work, such asWindows 98. The official binaries are built usingVisual Studio.
Native builds ofpsql don't support command line editing. TheCygwin build does support command line editing, so it should be used where psql is needed for interactive use onWindows.