[geos-devel] GEOS and VC++ 2005

strk at refractions.net strk at refractions.net
Sun Jan 8 10:42:20 EST 2006

On Sat, Jan 07, 2006 at 05:09:20PM -0700, Charlie Savage wrote:
> Hi everyone,
> I'm trying to compile GEOS HEAD using Visual C++ 2005.  I had to patch a 
> couple files, which I explain below (patch is also attached below).
> There is however a more fundamental issue which is setting up the right 
> exports for libgeos.dll.  This is generally done via 
> dllexport/dllimport, just like in libgeos_c.  Since libgeos.dll exports 
> C++ classes, you can dllexport all the classes.  Of course any such 
> exported classes can only be used by code compiled by VC++ due to C++ 
> name mangling.  The same if also true if you are using any other 
> compiler, for example MingW, to build libgeos.dll - it can only be 
> linked against by MinGW.

Please remember that use of the C++ ABI will not be maintained
stable, so I wouldn't put any effort in making it *more* accessible.
Rather, I'd shrink it down.
Using explicit dllexport would not be of general use for shrinking
it down (wold only work under windows).

I've committed your patches, with the modifications explained
earlier. I don't know if those changes (typedefs) influenced
in any way the SWIG wrapper, could you try that ?



More information about the geos-devel mailing list