[geos-devel] MingW compilation errors and patches

Charlie Savage cfis at savagexi.com
Mon Jun 26 16:18:58 EDT 2006


>> Any suggestions?
> 
> Is it a clean checkout ?
> I guess the above can happen if you change GEOS_INLINES define
> between different builds (deps problems).

Just to be sure, I deleted my copy of GEOS, and rechecked out.  Ran 
./autogen.sh, then ./configure.  Same issue.  Its actually not just 
constructors, for example:

.libs/libgeos.lax/libnoding.a/MCIndexSnapRounder.o: In function 
`ZN4geos6noding9snapround18MCIndexSnapRounderD1Ev':C:/Development/msys/src/geos/source/noding/snapround/MCIndexSnapRounder.cpp:(.text$_ZNK4geos6noding9snapround18MCIndexSnapRounder18getNodedSubstringsEv[__ZNK4geos6noding9snapround18MCIndexSnapRounder18getNodedSubstringsEv]+0x0): 
multiple definition of 
`geos::noding::snapround::MCIndexSnapRounder::getNodedSubstrings() const'

Haven't touched the GEOS_INLINES define.

> 
>> 2.  The finite function
> 
> FINITE() and finite() are really different functions, you should
> make sure the math.h header is included whenever finite() is used.
> Actually, the manual page states that _BSD_SOURCE must be defined.
> If anyone knows of a standard C++ equivalent that'd be nice.

Ok, looked at this more.  This is the same issue as the time stuff. 
MingW has the correct defines, but they are protected by the 
__STRICT_ANSI__ define.  Right now, MingW compiles with -ansi so they 
are not picked up.  I assume we want to keep it this way, so I've just 
copied the appropriate definitions from the header like this:

#if defined(__GNUC__) && defined(_WIN32)
int __cdecl _finite (double);
#define finite(x) _finite(x)
#endif

So this now matches what VC++ does - hopefully thats better.

Charlie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20060626/718d2005/smime.bin


More information about the geos-devel mailing list