[postgis-users] Problems with PostGIS and Proj4 on Cygwin

Norman Vine nhv at cape.com
Wed Jun 5 03:26:27 PDT 2002


Armin Burger writes:
>
>I used Postgres 7.2.1/PostGIS 0.7.1 and Proj4.4.5. I tried to reproject
>an Italian projection system (it is similar to UTM).
>
>I had to modify a bit the makefile for Proj4 in order to continue the
>'make install' procedure, but then it seemed to work. Maybe the
>compilation/installation was not complete, anyway. I don't if that
>matters, but I could not compile the dynamic libraries for Proj4, only
>the static ones were produced. But PostGIS compiled with the USE_PROJ=1
>option without complaining.
>
>I will also try to test the cygwin version of Norman Vine.

PostGIS should work fine with the static proj library

FWIW  It is fairly easy to make a DLL for Cygwin from a static library
with the 'current' Cygwin distribution

here is the command I use to do this for proj
this will ONLY work after a successful 'make' in the top level
proj source directory has built the 'static' link library

also note my use of the 'cyg' prefix for the dll

gcc -shared -o cygproj.dll \
	-Wl,--out-implib=libproj.dll.a \
	-Wl,--export-all-symbols \
	-Wl,--enable-auto-import \
	-Wl,--whole-archive ./src/.libs/libproj.a \
	-Wl,--no-whole-archive /lib/libcygwin.a

You will need to copy the resulting DLL into your path
and the resulting linker lib < libproj.dll.a > to where 'ld' will pick it up

FYI - All the above is 'buried' in the 'ld' documentation

Cheers

Norman





More information about the postgis-users mailing list