[geos-devel] Fw: 3.0

S Knox roxyknox at yahoo.co.uk
Wed Nov 5 22:31:42 EST 2008

Re: problem with Inlines.cpp causing multiple definition errors on Cygwin

OK, it seems that the problem with multiple definition is caused by the if clause. The reason that I got geos to compile previously was that I was using the line:
#if defined(__MINGW32__) && !defined(DLL_EXPORT)

and the condition wasn't being met therefore there was no multiple definition problem.

I understand these __......__ things are macros. Having tried Mark's patch:

#if !defined(__MINGW32__) || defined(__MINGW32__) && !defined(DLL_EXPORT) || !defined(__CYGWIN__) || defined(__CYGWIN__) && !defined(DLL_EXPORT)

, it doesn't work, neither does:

#if !defined(__MINGW32__) || defined(__MINGW32__) &&
!defined(DLL_EXPORT) || !defined(__CYGWIN32__) || defined(__CYGWIN32__)
&& !defined(DLL_EXPORT)

So it doesn't appear that the __CYGWIN__ macro is being defined. Can anyone point me in the direction of what's going on here? I know now it's not essential for me to build at all, but it might be for other systems & I want to learn and help out the community if I can.


Stephen (noob if you hadn't guessed!)

From: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
To: GEOS Development List <geos-devel at lists.osgeo.org>
Sent: Tuesday, 4 November, 2008 21:56:19
Subject: Re: [geos-devel] Fw: 3.0?

On Mon, 2008-11-03 at 22:34 +0000, S Knox wrote:
> Mark,
> Here are the diff files - I used a primitive version of diff, so hope
> the formatting is OK. 

Ummmm it's quite hard to read - "diff -c" or "diff -u" give more
human-readable output if they are available.

> I managed to run autogen.sh with the latest SVN build - the problem
> was they were in DOS not Unix line format for some reason. The
> following build wasn't successful(with the same error), so hopefully
> the diffs should shed some light.

Okay. It looks as if Cygwin doesn't define _WIN32 unless you specifically compile with 
-mwin32 which is why it's still not working. I've reworked my original patch to use the
__CYGWIN__ define instead, which I've attached to this email for you to
try. Please apply against a geos-3.0.2 tarball and let us know how you
get on.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geos-devel/attachments/20081106/eb962ebe/attachment.html

More information about the geos-devel mailing list