postgresql-ocaml / INSTALL




  1) Download and install PostgreSQL including development files:

     Your OS-distribution may already have a pre-compiled package, too.

     If the library is installed in a non-standard place, you may need
     to set the paths to the include file "libpq-fe.h" and to the static
     or shared libraries in Makefile.conf (variables INCDIRS and LIBDIRS).

  2) If there is anything non-standard about your OCaml-installation,
     look at the default settings in "OCamlMakefile" and set them to
     the values that are valid on your system. You can do this also by
     setting environment variables. This is greatly simplified if you
     normally use "OCamlMakefile" and have already configured your shell
     environment in startup files appropriately.

     You will need Gerd Stolpmann's "findlib"-tool!

     On some platforms (e.g. Solaris) it may be necessary to use gcc as
     C-compiler instead of the vendor one, i.e. "CC=gcc".

     If you want to compile the byte-code library without the
     "-custom"-switch, you will have to supply "NO_CUSTOM=y" to "make".

  3) Don't forget: you will need GNU-make!

     Enter "make" in the top directory to compile the library.

     By default, the library will be compiled to support dynamic
     linking. This may not necessarily work on all platforms. In case you
     encounter problems in the following steps, you may pass "STATIC=1"
     to "make" on the command line. This will only build and install a
     statically linkable library.

  4) Enter "make install" to install the library.

  x) If you want to compile the examples, enter "make examples".

     If dynamic linking was allowed, you may only be able to run the
     examples after installation of this library (step 4 above)!


   The call to PQconnectdb may fail under Windows if the application
   has not been linked with the system library wsock32.lib (at least
   when using a static version of libpq linked with the application,
   not the DLL).  This can be fixed by also linking unix.cma/unix.cmxa,
   which forces wsock32.lib.




  1) Easy: just enter "make uninstall". This will remove all files
     installed by "make install".



New York, 2008-03-19
Markus Mottl

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.