<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >Client-Only Installation on Windows</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REV="MADE" HREF="mailto:pgsql-docs@postgresql.org"><LINK REL="HOME" TITLE="PostgreSQL 8.0.11 Documentation" HREF="index.html"><LINK REL="UP" TITLE="Server Administration" HREF="admin.html"><LINK REL="PREVIOUS" TITLE="Supported Platforms" HREF="supported-platforms.html"><LINK REL="NEXT" TITLE="Server Run-time Environment" HREF="runtime.html"><LINK REL="STYLESHEET" TYPE="text/css" HREF="stylesheet.css"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"><META NAME="creation" CONTENT="2007-02-02T03:57:22"></HEAD ><BODY CLASS="CHAPTER" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="5" ALIGN="center" VALIGN="bottom" >PostgreSQL 8.0.11 Documentation</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="top" ><A HREF="supported-platforms.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="10%" ALIGN="left" VALIGN="top" ><A HREF="installation.html" >Fast Backward</A ></TD ><TD WIDTH="60%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="top" ><A HREF="runtime.html" >Fast Forward</A ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="top" ><A HREF="runtime.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="CHAPTER" ><H1 ><A NAME="INSTALL-WIN32" ></A >Chapter 15. Client-Only Installation on <SPAN CLASS="PRODUCTNAME" >Windows</SPAN ></H1 ><A NAME="AEN16312" ></A ><P > Although a complete <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > installation for <SPAN CLASS="PRODUCTNAME" >Windows</SPAN > can only be built using <SPAN CLASS="PRODUCTNAME" >MinGW</SPAN > or <SPAN CLASS="PRODUCTNAME" >Cygwin</SPAN >, the C client library (<SPAN CLASS="APPLICATION" >libpq</SPAN >) and the interactive terminal (<SPAN CLASS="APPLICATION" >psql</SPAN >) can be compiled using other Windows tool sets. Makefiles are included in the source distribution for <SPAN CLASS="PRODUCTNAME" >Microsoft Visual C++</SPAN > and <SPAN CLASS="PRODUCTNAME" >Borland C++</SPAN >. It should be possible to compile the libraries manually for other configurations. </P ><DIV CLASS="TIP" ><BLOCKQUOTE CLASS="TIP" ><P ><B >Tip: </B > Using <SPAN CLASS="PRODUCTNAME" >MinGW</SPAN > or <SPAN CLASS="PRODUCTNAME" >Cygwin</SPAN > is preferred. If using one of those tool sets, see <A HREF="installation.html" >Chapter 14</A >. </P ></BLOCKQUOTE ></DIV ><P > To build everything that you can on <SPAN CLASS="PRODUCTNAME" >Windows</SPAN > using <SPAN CLASS="PRODUCTNAME" >Microsoft Visual C++</SPAN >, change into the <TT CLASS="FILENAME" >src</TT > directory and type the command </P><PRE CLASS="SCREEN" ><KBD CLASS="USERINPUT" >nmake /f win32.mak</KBD ></PRE ><P> This assumes that you have <SPAN CLASS="PRODUCTNAME" >Visual C++</SPAN > in your path. </P ><P > To build everything using <SPAN CLASS="PRODUCTNAME" >Borland C++</SPAN >, change into the <TT CLASS="FILENAME" >src</TT > directory and type the command </P><PRE CLASS="SCREEN" ><KBD CLASS="USERINPUT" >make -N -DCFG=Release /f bcc32.mak</KBD ></PRE ><P> </P ><P > The following files will be built: <P ></P ></P><DIV CLASS="VARIABLELIST" ><DL ><DT ><TT CLASS="FILENAME" >interfaces\libpq\Release\libpq.dll</TT ></DT ><DD ><P > The dynamically linkable frontend library </P ></DD ><DT ><TT CLASS="FILENAME" >interfaces\libpq\Release\libpqdll.lib</TT ></DT ><DD ><P > Import library to link your programs to <TT CLASS="FILENAME" >libpq.dll</TT > </P ></DD ><DT ><TT CLASS="FILENAME" >interfaces\libpq\Release\libpq.lib</TT ></DT ><DD ><P > Static version of the frontend library </P ></DD ><DT ><TT CLASS="FILENAME" >bin\psql\Release\psql.exe</TT ></DT ><DD ><P > The <SPAN CLASS="PRODUCTNAME" >PostgreSQL</SPAN > interactive terminal </P ></DD ></DL ></DIV ><P> </P ><P > The only file that really needs to be installed is the <TT CLASS="FILENAME" >libpq.dll</TT > library. This file should in most cases be placed in the <TT CLASS="FILENAME" >WINNT\SYSTEM32</TT > directory (or in <TT CLASS="FILENAME" >WINDOWS\SYSTEM</TT > on a Windows 95/98/ME system). If this file is installed using a setup program, it should be installed with version checking using the <TT CLASS="SYMBOL" >VERSIONINFO</TT > resource included in the file, to ensure that a newer version of the library is not overwritten. </P ><P > If you plan to do development using <SPAN CLASS="APPLICATION" >libpq</SPAN > on this machine, you will have to add the <TT CLASS="FILENAME" >src\include</TT > and <TT CLASS="FILENAME" >src\interfaces\libpq</TT > subdirectories of the source tree to the include path in your compiler's settings. </P ><P > To use the library, you must add the <TT CLASS="FILENAME" >libpqdll.lib</TT > file to your project. (In Visual C++, just right-click on the project and choose to add it.) </P ><P > Free development tools from <SPAN CLASS="PRODUCTNAME" >Microsoft</SPAN > can be downloaded from <A HREF="http://msdn.microsoft.com/visualc/vctoolkit2003/" TARGET="_top" >http://msdn.microsoft.com/visualc/vctoolkit2003/</A >. You will also need <TT CLASS="FILENAME" >MSVCRT.lib</TT > from the platform SDK from <A HREF="http://www.microsoft.com/msdownload/platformsdk/sdkupdate/" TARGET="_top" >http://www.microsoft.com/msdownload/platformsdk/sdkupdate/</A >. You can also download the <SPAN CLASS="APPLICATION" >.NET</SPAN > framework from <A HREF="http://msdn.microsoft.com/netframework/downloads/updates/default.aspx" TARGET="_top" >http://msdn.microsoft.com/netframework/downloads/updates/default.aspx</A >. Once installed, the toolkit binaries must be in your path, and you might need to add a <TT CLASS="LITERAL" >/lib:<libpath></TT > to point to <TT CLASS="FILENAME" >MSVCRT.lib</TT >. Free <SPAN CLASS="PRODUCTNAME" >Borland C++</SPAN > compiler tools can be downloaded from <A HREF="http://www.borland.com/products/downloads/download_cbuilder.html#" TARGET="_top" >http://www.borland.com/products/downloads/download_cbuilder.html#</A >, and require similar setup. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="supported-platforms.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="runtime.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Supported Platforms</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="admin.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Server Run-time Environment</TD ></TR ></TABLE ></DIV ></BODY ></HTML >