[geos-devel] Building latest CVS HEAD with MSVC++ 8.0
Stefan Zschocke
s.zschocke at infozoom.de
Thu Feb 23 03:55:04 EST 2006
Hi,
seems I am missing something.
I have been experimenting with the geos-2.2.1.tar and I don't find round
anywhere in the sources.
Can you point me to the code where this round problem arises?
I have checked another c++ project of mine and there I do have a custom
round function, I don't remember why, but certainly it is because of the
same issue mentioned in this thread.
I use the following code:
long double roundl(long double d,short dec);
double round(double d,short dec);
#include <math.h>
#include <float.h>
inline long double roundl(long double d,short dec){
long double div=powl(10,dec);
d*=div;
d*=(1.+LDBL_EPSILON);
__asm{
fld d
frndint
fstp d
}
return d/div;
}
inline double round(double d,short dec){
double div=pow(10.,dec);
d*=div;
d*=(1.+DBL_EPSILON);
__asm{
fld d
frndint
fstp d
}
return d/div;
}
Stefan
-----Original Message-----
From: geos-devel-bounces at geos.refractions.net
[mailto:geos-devel-bounces at geos.refractions.net] On Behalf Of Charlie
Savage
Sent: Thursday, February 23, 2006 1:02 AM
To: GEOS Development List
Subject: Re: [geos-devel] Building latest CVS HEAD with MSVC++ 8.0
Hi Matuesz,
I was just offering to donate the Visual Studio C++ Solution files
(i.e., the VC++ project files) that I have to GEOS.
That is a separate thing from fixing the round function, which stops
VC++ from compiling GEOS whether you use Visual Studio, the Visual
Studio command line or nmake.
However, I gather the VC++ community doesn't use GEOS much though, since
there aren't any Visual Studio files or build scripts that GEOS provides
that work with VC++.
Charlie
Mateusz Łoskot wrote:
> Charlie Savage wrote:
>> One thing to follow up on. I realize there used to be VC++ solution
>> in the GEOS source tree. However, it wasn't maintained and thus was
>> removed a few months ago.
>>
>> Is there any interest in having a working VC++ solution again? I
>> don't mind keeping it up to date since I do that locally anyways.
>
> I don't understand. Are you talking about round function issue?
> Does it mean you are asking if it's worth to keep GEOS compilable
> with VC++ ?
> If I'm following your point, should I understand that GEOS is
> (usually) not compiled by the GEOS Community with VC++ at all?
>
> Cheers
More information about the geos-devel
mailing list