blob: 3cbe6734a4dd029f19cdb58b0570b3ad4fd85252 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
$Id: README.win32,v 1.1 2004-04-29 09:21:28 ivan Exp $
Here is a step-by-step procedure for getting DBD-Pg to work on Windows
NT. This Port has been done by Bob Kline <bkline@rksystems.com>.
prerequisites: (older versions might also work, but these are the
-------------- versions I used)
o Windows NT4 SP4
o Visual Studio 6.0
o ActivePerl-5_6_0_613 with DBI-1.13
o postgresql-7.0.2
o DBD-Pg-0.95
Here we assume, that perl and postgresql have been installed in C:\. Now
perform the following steps:
1. compile libpq
----------------
set POSTGRES_HOME=C:\postgresql-7.0.2
cd postgresql-7.0.2
mkdir lib
mkdir include
cd src
copy include\port\win32.h include\os.h
edit interfaces\libpq\fe-connect.c and add as first statement in connectDBStart() the following code:
#ifdef WIN32
static int WeHaveCalledWSAStartup;
if (!WeHaveCalledWSAStartup) {
WSADATA wsaData;
if (WSAStartup(MAKEWORD(1, 1), &wsaData)) {
printfPQExpBuffer(&conn->errorMessage, "WSAStartup failed: errno=%d\n", h_errno);
goto connect_errReturn;
}
WeHaveCalledWSAStartup = 1;
}
#endif
edit interfaces\libpq\win32.mak and change the flag /ML to /MD: CPP_PROJ=/nologo /MD ...
nmake /f win32.mak
cd ..
copy src\interfaces\libpq\Release\libpq.lib lib
copy src\interfaces\libpq\libpq-fe.h include
copy src\include\postgres_ext.h include
cd ..
2. build DBD-Pg
---------------
cd DBD-Pg
perl Makefile.PL CAPI=TRUE
nmake
set the environment variable PGHOST to the name of the postgresql server: set PGHOST=myserver
add on the server a postgres user with the same name as the NT-User (eg Administrator)
make sure, that your pg_hba.conf on the server is configured, such that a connection from another host will be accepted
mkdir C:\tmp
nmake test (expect to get errors concerning blobs)
nmake install
|