[geos-devel] Library Creation

Norman Vine nhv at cape.com
Fri Feb 20 10:14:24 EST 2004


< moved back to geos list >
 
> Thanks for the info Norman. This raises a question about Cygwin;
> 
> After compiling and installing GEOS and Proj4, I see the .a and .la libraries in
> the respective directories, but no .dll's. I have tested both GEOS and Proj4
> with my PostGIS install and everything is normal. I looked around on the net for
> a good hour to find out how Cygwin compiles, but all I could find is reference
> to making .dll's. So, would my theory be correct in assuming that PostGIS.dll
> must access the static object libraries libgeos.a and libproj.a directly?

This is probably the case as a dll will not be made if there are any undefined
symbols at dll creation time

I tweak the scripts to make dlls for my system but all systems are not setup
the same and I don't have the time or motive to maintain 'official' cygwin packages

I will however continue to support the OpenSource packages I use to the
extent that they work on Cygwin for as long as I continue to use Cygwin
but only through the project's list so that all can benefit

Cheers

Norman

FYI here is a script that can be run from the top proj4 dir to 
create a dll.  note you will have to manually install the resultant
files appropriately

     however THIS IS UNSUPPORTED by me
So don't even bother to ask questions about how to use this
unless you are willing to pay a consultants fee

if you don't understand it search the Cygwin project's lists
or ask your questions there

i.e.
    You are on your own  --  < but this works >

Note you can do similar things with any static library however
you must insure that all references are imported ala the 
-Wl --archive,  -Wl --whole-archive linker directives appropriately
 see the architecture specific man pages for 'ld'

hopefully libtool support for gcc on Win32 will improve in the future
and this will be automated some day

=== cut ===
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







More information about the geos-devel mailing list