10.6.2.3 macOS

To compile psqlODBC on macOS, you will need to have Xcode and its "Command Line Tools" component installed on your system, as this includes the required gcc compiler. Xcode is free, and available from the AppStore. And after installing Xcode, open it and go to Preferences, Downloads, Components, and then install the "Command Line Tools" component.

Download the psqlODBC source tarball file from http://www.postgresql.org/ftp/odbc/versions/src/. Use the latest version available for download, which will be at the bottom of the downloads page. The file will look similar to psqlodbc-09.03.0400.tar.gz. Extract this tarball to a temporary location, open a terminal, and cd into that directory. The installation process is:

$> cd the/src/directory
$> ./configure --with-iodbc --enable-pthreads
$> CFLAGS="-arch i386 -arch x86_64" make
$> sudo make install