[geos-devel] Fw: 3.0

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Sat Nov 15 09:24:44 EST 2008


On Sun, 2008-11-09 at 23:04 +0000, S Knox wrote:
> Mark,
> 
> after some deliberation, I think I've found the issue. Currently the
> line reads:
> 
> #if !defined(__MINGW32__) || defined(__MINGW32__) && !
> defined(DLL_EXPORT) || 
> !defined(__CYGWIN__) || defined(__CYGWIN__) && !defined(DLL_EXPORT)
> 
> However if it is changed to read:
> 
> #if defined(__MINGW32__) && !defined(DLL_EXPORT) || 
> !defined(__CYGWIN__) || defined(__CYGWIN__) && !defined(DLL_EXPORT)
> 
> It compiles correctly.
> 
> Therefore I think this is a logic issue. If __CYGWIN__ is defined, then you would expect __MINGW32__ not to be defined, or vice versa. So this condition will always be met even if you have either Cygwin or MinGW (at least that seems to be what's happening on my system).


Hi Steve,

I had a look at this on a cygwin gcc-4.3 install and the issue is that
libtool doesn't define DLL_EXPORT during the build process. The
interesting aspect coming from this is that I think upon review that the
MingW/Cygwin workarounds are effectively just silently removing the
inlines from the build. However, I don't have enough experience with the
linker to know if this is even possible in the Win32 world, or if it's a
gcc thing :(

Please find attached 2 files: the first is a new source/inlines.cpp
which should replace the one in GEOS 3.0.3rc1. This works for me under
Linux, MingW32 and cygwin, so please test and report back.

The second file is a patch to apply the above changes to SVN 3.0 branch
and SVN trunk, assuming that everything works as it should. If the above
testing goes to plan and these are applied to SVN just before release,
please can someone verify that this doesn't affect the MSVC GEOS build?
I'm reasonably confident they shouldn't, but it would be nice to make
sure...


ATB,

Mark.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: geos-3.0.3svn-cygwin.patch
Type: text/x-patch
Size: 2274 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20081115/4771b413/geos-3.0.3svn-cygwin.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inlines.cpp
Type: text/x-c++src
Size: 2496 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20081115/4771b413/inlines.bin


More information about the geos-devel mailing list