Download Postgresql Odbc Driver

This page describes how to build the PostgreSQL ODBC Driver on Windows. Thereare three methods to build: from command line using nmake makefiles, fromPowershell using MSBuild files, and from Visual Studio IDE.

  1. Download Odbc Driver For Postgresql 10
  2. Download Postgresql Odbc Driver

The ODBC Driver for PostgreSQL download page. We use cookies to provide you with a better experience on the Devart website. The PostgreSQL ODBC Driver is a powerful tool that allows you to connect with live PostgreSQL data, directly from any applications that support ODBC connectivity. Access PostgreSQL databases from virtually anywhere through a standard ODBC Driver interface. As the most widely used interface to.

Download Postgresql Odbc Driver

The following 3rd party software are required for the build:

  • Microsoft Windows SDK 7.0 (or later), or Microsoft Visual Studio C++ 2005 Edition (or later). Other compilers may work but have not been tested. Download the latest version from Microsoft's download page
  • PostgreSQL Client library (libpq.dll) and headers. Download the latest version from the PostgreSQL Binaries Download page.
  • WiX Toolset. Required for building the installer. Download the latest version from the WiX Toolset website

Building with Powershell and MSBuild

Building with nmake.exe

Use NMAKE.exe to build the driver for the currently active target:
C:psqlodbc> nmake /f win64.mak <options>

Despite the name, win64.mak is used to build both 32-bit and 64-bit binaries.With the Microsoft Windows SDK Command Prompt, you can switch between 32-bitand 64-bit target architectures with setenv /x86 and setenv/x64 commands. If using a Visual Studio Command Prompt you can start thex86 or x64 versions from the Start menu, or run vcvarsall.bat withappropriate options to switch architectures.

To build the .msi installer file:
C:psqlodbc> nmake /f win64.mak installer
The resulting installer file goes to installer/x64 or installer/x86 directory.

To build both 32-bit and 64-bit versions in one command:
C:psqlodbc> nmake /f win64.mak world

Download Postgresql Odbc DriverOdbc

The following build options may be used, either on the command line, orby creating a file called 'windows-local.mak'.

Download Odbc Driver For Postgresql 10

VariableValues
CFGRelease(default), or Debug
PG_INC$(PROGRAMFILES)PostgreSQL9.3include
PG_LIB$(PROGRAMFILES)PostgreSQL9.3lib
SSL_INCC:OpenSSL-Win32include
SSL_LIBC:OpenSSL-Win32lib
ANSI_VERSIONno (If set to 'yes', output dll name to psqlodbc30a.dll)
MSDTCyes
  1. UNICODE is the default (psqlodbc35w.dll), unless ANSI_VERSION is selected (psqlodbc30a.dll)
  2. libpq.dll is mandatory.
  3. If MSDTC Yes, 'pgxalib.dll' is created.
  4. If MSDTC is enabled, ANSI_VERSION also creates 'pgenlista.dll', or UNICODE creates 'pgenlist.dll'.

IDE Method

A Microsoft Visual Studio project file (and workspace) is included in the source tree.

psqlodbc.dsp can be used with Microsoft Visual C++ 6.0.

psqlodbc.proj andpsqlodbc.slncan be used with Microsoft Visual C++ 2005 Edition (including the Express edition which can be downloaded free of charge from http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx)

Preparation before the build:

Download Postgresql Odbc Driver

  1. The Windows distribution of PostgreSQL will install the required headers and libraries into C:Program FilesPostgreSQL9.2
  2. OpenSSL should be installed into C:OpenSSL (OpenSSL binaries can be downloaded from http://www.slproweb.com/products/Win32OpenSSL.html)

If you want to change the installation arrangement, itis necessary to edit the project settings.

Note:

The default build settings will create the following driver:

  1. UNICODE support.
  2. libpq is mandatory.
  3. The driver filename is 'psqlodbc35w.dll'.