wiki:DevWikiWinVC_15

Version 13 (modified by robe, 14 years ago) ( diff )

--

Back to Window Compile

Compiling PostGIS 1.5 under VC++

This is still a work in progress

Compile PostgreSQL under VC++ 2008 (express or Studio)

Note that if you are compiling for 64-bit, Express is not supported so you have to use VC++ Professional or above. Full details here

We will just cover enough to be able to compile PostGIS so will not be compiling with additional dependencies

  1. Install Active State ActivePerl (5.8+) http://www.activestate.com/activeperl/downloads
  2. Download PostgreSQL source and Extract PostgreSQL 9.0 source tar ball into folder C:\Projects\PostgreSQL\postgresql-9.0.0win
  3. Create a file C:\Projects\PostgreSQL\postgresql-9.0.0win\src\tools\msvc\buildenv.pl

Add add a line -- note in our case -- we compile with mingw usually, so we are completely overwriting the path with one that doesn't contain mingw because mingw and VC++ don't play well together when compiling PostgreSQL

#-- buildenv.pl starts here --
$ENV{PATH}='C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\Support Tools\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\opt\gtk\bin;C:\Program Files\R\R-2.10.1\bin';
$ENV{PATH} = $ENV{PATH} . ';C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 9.0\VC\VCPackages';
# -- buildenv.pl ends here --
Note: See TracWiki for help on using the wiki.