MapServer / MapServer-import

3 stars 2 forks source link

Win32 Compilation and Installation HOWTO: PostGIS section #1251

Open tbonfort opened 12 years ago

tbonfort commented 12 years ago

Reporter: bartvde@osgis.nl Date: 2005/02/21 - 10:24

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
tbonfort commented 12 years ago

Author: bartvde@osgis.nl Date: 2005/03/04 - 12:36

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.
tbonfort commented 12 years ago

Author: jmckenna@dmsolutions.ca Date: 2005/06/08 - 23:40

reassigning to perry to update the doc
tbonfort commented 12 years ago

Author: jmckenna@dmsolutions.ca Date: 2005/06/08 - 23:41

perry do u mind taking this one?
tbonfort commented 12 years ago

Author: nacional@cbs.umn.edu Date: 2005/12/20 - 23:12

Sorry I missed this earlier.  I've added it now.

-Perry