[geos-devel] compiling problem
strk at refractions.net
strk at refractions.net
Sat Sep 11 13:17:04 EDT 2004
On Sat, Sep 11, 2004 at 07:12:34AM +0200, Michel Garand wrote:
> Greetings!
>
> I am compiling GEOS 2.0.0 on a Debian machine
>
> why do i get the following error?
>
> ......
> LineString.cpp:221: comparison of distinct pointer types `geos::Geometry
> *' and `const geos::LineString *' lacks a cast
Because that comparison lacks a cast :<
Actually the two pointers are of the same size, and the objects they
point to are one a subclass of the other.
I never got a compiler error
[g++ (GCC) 3.3.2 20031005 (Debian prerelease)]
Substitute line 221 of source/geom/LineString.cpp from:
if ( in != this ) delete(in);
to:
if ( (LineString *)in != this ) delete(in);
and see if your compiler likes it.
Other places omit that cast, though..
What's your compiler version ?
--strk;
More information about the geos-devel
mailing list