Installation Guide
Fetch the archive there: http://cartoweb.org/downloads.html#pgdijkstra
Install Postgresql 8.1 (see http://www.postgresql.org/ftp/binary/)
- Copy libdijkstra.dll from the pgdijkstra archive into the PostgreSQL lib directory (for instance C:\Program Files\PostgreSQL\8.1\lib)
- Create your new database for pgdijkstra (or use an existing one or other user that postgres)
createdb -U postgres mydb
- Add plpgsql language
createlang plpgsql -U postgres mydb
- Add the pgdijkstra functions and types (add the correct path to dijkstra.sql from the archive):
psql -U postgres mydb -f c:\pgdijkstra\dijkstra.sql
- If you want to add postgis functions, you can type:
psql -U postgres mydb -f c:\pgdijkstra\dijkstra_postgis.sql
- You are done!
Compilation Guide
Note: It is certainly possible to do it differently, this is just one way to achieve compilation
Install mingw and msys (see http://www.postgresql.org/docs/faqs.FAQ_MINGW.html)
- Install cygwin with boost and boost-dev packages (in Libs section)
- Add Postgresql bin directory to your path, so that when you type "pg_config", the command is found
- Fetch pgdijkstra and edit Makefile and set the correct path to BOOST_PATH variable. I have this with cygwin installed in c:\cygwin:
BOOST_PATH=c:/cygwin/usr/include/boost-1_33_1
- Type make. This should build the libdijkstra.dll and the dijkstra.sql file
- In dijkstra.sql, I replaced '$libdir/dijkstra' with '$libdir/libdijkstra.dll' (I don't know why this is not replaced correctly on win32).