Compiling psqlODBC on Windows

This page describes how to build the PostgreSQL ODBC Driver (psqlodbc.dll) on Win32 platforms. Microsoft Visual C++ version 6.0 or higher is required. Other compilers may work but have not been formally tested. The psqlodbc.dll may be built either in the VC++ IDE or from the command line:

IDE Method

A Microsoft Visual C++ 6.0 project file (and workspace) is included in the source tree. Simply load the project, and build whichever configurations you prefer.

Command Line Method

  1. From a command prompt, run the vcvars32.bat file that comes with Visual C++. This will setup the environment for using the VC++ compiler.
  2. CD to the directory containing the source code.
  3. Use NMAKE to build the dll eg:

    C:\psqlodbc\> nmake /f win32.mak CFG=Release ALL

    Possible configurations are Release and Debug.
    Possible build types are ALL or CLEAN.