Opened 19 years ago

Closed 18 years ago

#1251 closed defect (fixed)

Win32 Compilation and Installation HOWTO: PostGIS section

Reported by: bartvde@… Owned by: nacional@…
Priority: high Milestone:
Component: Documentation - MapServer Version: 4.5
Severity: normal Keywords:
Cc: jmckenna@…

Description

I have just finished compiling the PostGIS connector for Mapserver on Windows
using PostgreSQL 8.0.1. It might be good to include a section in the Win32
Compilation Howto.

What I had to do was the following:

1. download the PostgreSQL 8.0.1 sources (postgresql-8.0.1.tar.gz) eg from:
ftp://ftp.heanet.ie/pub/postgresql/source/v8.0.1/postgresql-8.0.1.tar.gz

2. I extracted them to C:\projects\postgresql-8.0.1

3. download the Microsoft Platform SDK (250 Mb!) from 

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ 

otherwise you get link errors on shfolder.lib.

4. compile libpq under C:\projects\postgresql-8.0.1\src\interfaces\libpq using
the win32.mak makefile

5. copy everything from
C:\projects\postgresql-8.0.1\src\interfaces\libpq\release to
C:\projects\postgresql-8.0.1\src\interfaces\libpq as the Mapserver makefile will
try to find it there

6. Define the following in the nmake.opt for Mapserver:

POSTGIS =-DUSE_POSTGIS
POSTGIS_DIR =c:/projects/postgresql-8.0.1/src

7. nmake /f makefile.vc

8. don't forget to copy libpq.dll (from
C:\projects\postgresql-8.0.1\src\interfaces\libpq\release) into a location where
Mapserver can find it

Change History (4)

comment:1 by bartvde@…, 19 years ago

After cleaning and building again I ran into the shfolder problem again.

I had to do the following to fix this:

REM *** This is needed for compiling libpq for PostGIS ***
REM *** Configure for where you installed the Microsoft Platform SDK ***
set LIB=D:\program files\Microsoft Platform SDK for Windows XP SP2\Lib;%LIB%
set INCLUDE=D:\program files\Microsoft Platform SDK for Windows XP
SP2\Include;%INCLUDE%

This is only when compiling with Microsoft nmake's tool.

comment:2 by jmckenna@…, 19 years ago

Owner: changed from kgeurts@… to nacional@…
reassigning to perry to update the doc

comment:3 by jmckenna@…, 19 years ago

Cc: jmckenna@… added
perry do u mind taking this one?

comment:4 by nacional@…, 18 years ago

Resolution: fixed
Status: newclosed
Sorry I missed this earlier.  I've added it now.

-Perry
Note: See TracTickets for help on using tickets.