Compiling Mapserver with PostGIS support under Windows

Sture Dingsøyr candalt at ONLINE.NO
Tue Nov 29 01:55:16 EST 2005


Hi there

This is what i did (i used Visual C++ 6.0):

I did not use the PostgreSQL 8.1 source but the postgresql-8.0.0.

- open CMD

- vcvars32 (this sets the Visual C++ 6.0 environment variables). You will find a vcvars32.bat file under your install directory for Visual C++ 7.0

- enter the postgresql-8.0.0 directory

- cd src

- nmake /f win32.make

This produced under "postgresql-8.0.0\src\interfaces\libpq\Release" a libpq.dll 

Thats it :-)



Hello,

I'm attempting to compile Mapserver with support for PostGIS (Postgresql 8.1) using Visual C++ 7.  The Mapserver make file requires a version of the Postgresql client "libpqdll.lib" which is where I'm stuck.  I've got the Postgresql 8.1 source but have not been able to create libpqdll.lib using VC++. (seems like a problem with linking in appropriate winsock definitions).

 As an alternative, I have been able to compile a static version of libpqxx (2.5.5), but haven't been able to get it to link into Mapserver.  I've noticed that others are having similar problems, but I've yet to find a solution.

I've used pre-built versions of Mapserver (MS4W and FWTools) sucessfully with Postgresql 8.1/PostGIS, so I know it is possible.  If anyone can provide any insight into this problem, I would be much obliged.  Perhaps I should be using a different compiler? (Mingw?)

thanks,

Lance Goode


More information about the mapserver-users mailing list