2 $Id: README.win32,v 1.1 2004-04-29 09:21:28 ivan Exp $
5 Here is a step-by-step procedure for getting DBD-Pg to work on Windows
6 NT. This Port has been done by Bob Kline <bkline@rksystems.com>.
9 prerequisites: (older versions might also work, but these are the
10 -------------- versions I used)
14 o ActivePerl-5_6_0_613 with DBI-1.13
18 Here we assume, that perl and postgresql have been installed in C:\. Now
19 perform the following steps:
25 set POSTGRES_HOME=C:\postgresql-7.0.2
30 copy include\port\win32.h include\os.h
31 edit interfaces\libpq\fe-connect.c and add as first statement in connectDBStart() the following code:
33 static int WeHaveCalledWSAStartup;
34 if (!WeHaveCalledWSAStartup) {
36 if (WSAStartup(MAKEWORD(1, 1), &wsaData)) {
37 printfPQExpBuffer(&conn->errorMessage, "WSAStartup failed: errno=%d\n", h_errno);
38 goto connect_errReturn;
40 WeHaveCalledWSAStartup = 1;
43 edit interfaces\libpq\win32.mak and change the flag /ML to /MD: CPP_PROJ=/nologo /MD ...
46 copy src\interfaces\libpq\Release\libpq.lib lib
47 copy src\interfaces\libpq\libpq-fe.h include
48 copy src\include\postgres_ext.h include
56 perl Makefile.PL CAPI=TRUE
58 set the environment variable PGHOST to the name of the postgresql server: set PGHOST=myserver
59 add on the server a postgres user with the same name as the NT-User (eg Administrator)
60 make sure, that your pg_hba.conf on the server is configured, such that a connection from another host will be accepted
62 nmake test (expect to get errors concerning blobs)