[geos-devel] Fw: 3.0

S Knox roxyknox at yahoo.co.uk
Sun Nov 9 18:04:10 EST 2008


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). I don't exactly understand how the multiple definition errors are occuring, so can't suggest a replacement, but wouldn't a nested if structure be better, eg:

if mingw32 or cygwin defined
    if dll_export defined
    do nothing
    else 
    include inline files
    end if
do nothing
else
include inline files
end if

Regards

Steve




________________________________
From: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
To: GEOS Development List <geos-devel at lists.osgeo.org>
Sent: Thursday, 6 November, 2008 17:39:34
Subject: Re: [geos-devel] Fw: 3.0


> 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.
>
> Regards
>
> Stephen (noob if you hadn't guessed!)

*blinks* that makes no sense at all!? Can you knock up a quick C program
to verify whether or not this is actually the case, or whether it's
something strange that autoconf is putting in compile/link flags?


Many thanks,

Mark.


_______________________________________________
geos-devel mailing list
geos-devel at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-devel



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


More information about the geos-devel mailing list