| 62 | | i) Copy win32/common-sample to win32/common, and edit the latter to reflect the |
|---|
| 63 | | paths to your PostgreSQL includes and library files. On Windows these may |
|---|
| 64 | | differ from one person's system to another, but if you compiled PostgreSQL |
|---|
| 65 | | for yourself to obtain libpq, simply set the PGSQLSRC in win32/common to |
|---|
| 66 | | point to the "src" subdirectory in your PostgreSQL source tree. You may also |
|---|
| 67 | | have to edit the LIBPATH1 and LIBPATH2 variables to point to where your |
|---|
| 68 | | actual libpq library is. There are two of these because Visual C++ will |
|---|
| 69 | | normally produce two versions ("release" and "debug") of the library, and the |
|---|
| 70 | | build procedure may need to find either, depending on which kind of libpqxx |
|---|
| 71 | | build you'll be doing. If you have only one libpq version, just set LIBPATH1 |
|---|
| 72 | | and LIBPATH2 to name the same directory. |
|---|
| 73 | | |
|---|
| 74 | | ii) If you cannot run the configure script: Create the configuration headers, |
|---|
| 75 | | include/pqxx/config-*-*.h. From config/sample-headers, copy the ones from |
|---|
| 76 | | the directories most accurately describing your compiler and libpq version, |
|---|
| 77 | | respectively. On a Unix-like system these would be generated by the |
|---|
| 78 | | configure script; in the Windows case they may need some editing. How these |
|---|
| 79 | | files work is described in more detail below. |
|---|
| | 62 | i) Copy win32/common-sample to win32/common, and edit the latter to reflect |
|---|
| | 63 | the paths to your PostgreSQL includes and library files. On Windows these |
|---|
| | 64 | may differ from one person's system to another, but if you compiled |
|---|
| | 65 | PostgreSQL for yourself to obtain libpq, simply set the PGSQLSRC in |
|---|
| | 66 | win32/common to point to the "src" subdirectory in your PostgreSQL source |
|---|
| | 67 | tree. You may also have to edit the LIBPATH1 and LIBPATH2 variables to |
|---|
| | 68 | point to where your actual libpq library is. There are two of these because |
|---|
| | 69 | Visual C++ will normally produce two versions ("release" and "debug") of the |
|---|
| | 70 | library, and the build procedure may need to find either, depending on which |
|---|
| | 71 | kind of libpqxx build you'll be doing. If you have only one libpq version, |
|---|
| | 72 | just set LIBPATH1 and LIBPATH2 to name the same directory. |
|---|
| | 73 | |
|---|
| | 74 | ii) If you cannot run the configure script: Create the configuration headers, |
|---|
| | 75 | include/pqxx/config-*-*.h. From config/sample-headers, copy the ones from |
|---|
| | 76 | the directories most accurately describing your compiler and libpq version, |
|---|
| | 77 | respectively. On a Unix-like system these would be generated by the |
|---|
| | 78 | configure script; in the Windows case they may need some editing. How these |
|---|
| | 79 | files work is described in more detail below. |
|---|
| | 80 | |
|---|
| | 81 | iii) If you are building from a development source tree rather than from a |
|---|
| | 82 | release distribution, you may not have the makefiles for your compiler. |
|---|
| | 83 | These makefiles should be in the win32 directory and have names ending in |
|---|
| | 84 | ".mak". If you have python, you can generate them using the template2mak.py |
|---|
| | 85 | script in the tools directory: |
|---|
| | 86 | |
|---|
| | 87 | ./tools/template2mak.py win32/mingw.mak.template win32/mingw.mak |
|---|
| | 88 | ./tools/template2mak.py win32/vc-libpqxx.mak.template win32/vc-libpqxx.mak |
|---|
| | 89 | ./tools/template2mak.py win32/vc-test.mak.template win32/vc-test.mak |
|---|