This is an old revision of the document!
Building the MySQL and PostgreSQL libraries on Windows
MySQL does not support gcc on Windows, only MSVC. Moved to a separate page.
PostgreSQL
http://www.postgresql.org/ftp/source/v8.3.9/
There is a bug in src/template/win32
: it sets LDFLAGS
unconditionally. Change this line:
LDFLAGS="-Wl,--allow-multiple-definition"
to this:
LDFLAGS="$LDFLAGS -Wl,--allow-multiple-definition"
Then configure and build:
$ LDFLAGS=-L/c/met.no/lib CPPFLAGS=-I/c/met.no/include ./configure --prefix=/c/met.no $ make
We don't want to install the entire package (server and all); we'll just install the library and headers and the pg_config
tool which is used by other packages (such as libpqxx
) that link against libpq
.
$ make -C src/include install $ make -C src/interfaces/libpq install $ make -C src/bin/pg_config install
''libpqxx'' (C++ interface)
http://pqxx.org/development/libpqxx/wiki/DownloadPage
$ LDFLAGS=-L/c/met.no/lib CPPFLAGS=-I/c/met.no/include PG_CONFIG=/c/met.no/bin/pg_config.exe ./configure --prefix=/c/met.no $ make all install