[geos-devel] Compiling GEOS on win32

Theuns Heydenrych Theuns at softsim.co.za
Thu Jul 27 09:35:45 EDT 2006


HI Mateusz

Thanks a milion for this info , and saving me days of frustration and a lot
of hair.

Yes , i tried to compile it with VC++ 6.

But Could i compile it with mingw32 and msys with GCC?

You see i am actualy a delphi programmer and just need a win32 DLL of GEOS
to use in my app.

Thanks

-----Original Message-----
From: Mateusz Loskot [mailto:mateusz at loskot.net]
Sent: 27 July 2006 01:58
To: GEOS Development List
Subject: Re: [geos-devel] Compiling GEOS on win32


Theuns Heydenrych wrote:
> hi I am a newby with GEOS
> 
> I installed svn and downloaded the latest code with svn. When
> compiling the source with nmake i get the following errors.
> 
> Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0 
> Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
> 
> copy ..\capi\geos_c.h.vc ..\capi\geos_c.h 1 file(s) copied. cl
> -Iheaders /MD /GR /O2 /D "NDEBUG" /nologo  /D "NOMINMAX" /D "WIN32_LE
>  AN_AND_MEAN" /D "NOGDI"  /GX /c algorithm\CGAlgorithms.cpp 
> /Foalgorithm\CGAlgori thms.obj CGAlgorithms.cpp 
> algorithm\CGAlgorithms.cpp(342) : error C2039: 'min' : is not a
> member of 'std' algorithm\CGAlgorithms.cpp(342) : error C2065: 'min'
> : undeclared identifier algorithm\CGAlgorithms.cpp(343) : error
> C2039: 'min' : is not a member of 'std' 
> algorithm\CGAlgorithms.cpp(344) : error C2039: 'min' : is not a
> member of 'std' algorithm\CGAlgorithms.cpp(350) : error C2039: 'min'
> : is not a member of 'std' algorithm\CGAlgorithms.cpp(351) : error
> C2039: 'min' : is not a member of 'std' 
> algorithm\CGAlgorithms.cpp(352) : error C2039: 'min' : is not a
> member of 'std' NMAKE : fatal error U1077: 'cl' : return code '0x2' 
> Stop.
> 
> 
> Is it posible to compile the code with Mingw32 and MSYS perhaps?

But you're not compiling with MinGW, are you?

>From the output above I see you're using VC++ 6, which is broken.
Honestly, VC++ is an evil if you're playing with C++.

Back to the problem, here you have the explanation:
http://msdn.microsoft.com/library/en-us/vccore/html/vclrfminmaxdefinechange.
asp
http://babbage.cs.qc.edu/STL_Docs/algorithm_min.htm

Simply, std::min and std::max simply don't exist in the VC6 version of
STL, because it's a very old and not ISO C++ Standard compliant STL.

AFAIR, you won't be able to build GEOS using Visual C++ 6.0.
For example, geos uses in-place initialization of static const integer
data members, what feature is not supported by VC++ < 7.1 (Visual C++ 2003).

FYI, Recommended version of C++ compiler from Microsoft starts from
Visual C++ 2003 (7.1).

Best regards
-- 
Mateusz Loskot
http://mateusz.loskot.net
_______________________________________________
geos-devel mailing list
geos-devel at geos.refractions.net
http://geos.refractions.net/mailman/listinfo/geos-devel
###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/



More information about the geos-devel mailing list