Text Size: Normal / Large

16.2. Building libpq with Visual C++ or Borland C++

Using Visual C++ 7.1-8.0 or Borland C++ to build libpq is only recommended if you need a version with different debug/release flags, or if you need a static library to link into an application. For normal use the MinGW or Visual Studio 2005 version is recommended.

To build the libpq client library using Visual Studio 7.1 or later, change into the src directory and type the command

nmake /f win32.mak

To build a 64-bit version of the libpq client library using Visual Studio 8.0 or later, change into the src directory and type in the command

nmake /f win32.mak CPU=AMD64

See the win32.mak file for further details about supported variables.

To build the libpq client library using Borland C++, change into the src directory and type the command

make -N -DCFG=Release /f bcc32.mak

16.2.1. Generated files

The following files will be built:

interfaces\libpq\Release\libpq.dll

The dynamically linkable frontend library

interfaces\libpq\Release\libpqdll.lib

Import library to link your programs to libpq.dll

interfaces\libpq\Release\libpq.lib

Static version of the frontend library

Normally you do not need to install any of the client files. You should place the libpq.dll file in the same directory as your applications executable file. Do not install libpq.dll into your Windows, System or System32 directory unless absolutely necessary. If this file is installed using a setup program, it should be installed with version checking using the VERSIONINFO resource included in the file, to ensure that a newer version of the library is not overwritten.

If you are planning to do development using libpq on this machine, you will have to add the src\include and src\interfaces\libpq subdirectories of the source tree to the include path in your compiler's settings.

To use the library, you must add the libpqdll.lib file to your project. (In Visual C++, just right-click on the project and choose to add it.)


User Comments

No comments could be found for this page.

Add Comment

Please use this form to add your own comments regarding your experience with particular features of PostgreSQL, clarifications of the documentation, or hints for other users. Please note, this is not a support forum, and your IP address will be logged. If you have a question or need help, please see the faq, try a mailing list, or join us on IRC. Note that submissions containing URLs or other keywords commonly found in 'spam' comments may be silently discarded. Please contact the webmaster if you think this is happening to you in error.

In order to submit a comment, you must have a community account.

* Comment
 

* denotes required field

Privacy Policy | Project hosted by our server sponsors. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group