Re: Installing DBD::Pg on Strawberry Perl

Mark Dootson <mark.dootson-/NdgfL/[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <[email protected]>
Hi,

Not directly helpful for MinGW / Strawberry, but I try to compile all my modules for ActiveState perl with VC6.

I have PostgreSQL 8.3 installed from the msi and I selected to install development files.

The changes I needed to make in DBD::Pg were:

Makefile.PL -
add 'use DBI::DBD;'.
comment out "unlink $output->{MAKEFILE};" at line 247

dbdimp.c
comment out #include <strings.h>

I then used the following statements

set PATH=C:\PROGRA~1\PostgreSQL\8.3\bin;%PATH%
set DBI_DSN=dbi:Pg:dbname=testdb
set DBI_USER=username
set DBI_PASS=password
set POSTGRES_HOME=C:/PROGRA~1/PostgreSQL/8.3
set POSTGRES_INCLUDE=C:/PROGRA~1/PostgreSQL/8.3/include
set POSTGRES_LIB=C:/PROGRA~1/PostgreSQL/8.3/lib

before doing

perl Makefile.PL
nmake
nmake test


All seems to work OK.

I also built against my own perl compiled with VC6. For this I needed an extra step.
I had to "#define snprintf _snprintf" in quote.c rather than dbdimp.c

I haven't quite figured out why - but there you go.

Anyway, I think that if VC6 is possible, MinGW should be OK too


F.Y.I. - Of course, when you run DBD::Pg built this way, you must have libpq.dll and its dependencies on your path.




Regards

Mark
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.