<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<DEFANGED_meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
<title></title>
</head>
<body>
<br>
<br>
Bernhard Reiter wrote:<br>
<blockquote type="cite" cite="mid20031022083600.GD28324@intevation.de">
<pre wrap="">On Tue, Oct 21, 2003 at 08:05:32PM +0200, Thierry Laronde wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Tue, Oct 21, 2003 at 01:22:57PM -0400, Laura Toma wrote:
</pre>
<blockquote type="cite">
<pre wrap="">As far as I can tell all the compile problems with r.terraflow are
because of the #include lines.
With gcc3.2 and 3.3 all #include <X.h> should be replaced with #include
<X>.
Also, the header strstream.h is deprecated, and should be replaced with
sstream.
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->
I'll take it this exclusively holds for C++?
It would be interesting to get a pointer to the rationale behind it.
Anyway this is a point where I'm glad that the tradition
is to keep a lot of GRASS' code in plain C.
</pre>
</blockquote>
<br>
Yes, only for C++. It certainly is a pain to maintain C++ with the new gcc
3.x, but there's no way around it..It's the price to pay for efficient code.
<br>
<br>
The main reason r.terraflow is in C++ instead of C is templating. All functions
are templated and the type is determined at runtime, causing the appropriate
function to be instantiated. This is more efficient than using void* in C,
and also saves *a lot* of redundant code. <br>
<blockquote type="cite" cite="mid20031022083600.GD28324@intevation.de">
<pre wrap="">
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">In any case the code should be fixed to compile without warnings (and
errors).. I'll be working on it.
</pre>
</blockquote>
<pre wrap="">Great. All I wanted to emphasize ---since I have spent some times trying
to convince GNU libc (latest) and GNU cc (latest) to compile smoothly
together...--- is that we are going to have some hard time with mixes
of different versions of gcc and glibc... And the C++ support has deeply
changed too!
</pre>
</blockquote>
<pre wrap=""><!---->
Well it is _only_ about the C++ support as far as I always understood this.
Mixing most of the plain C libraries have never been a major problem.
Am I missing something?
</pre>
</blockquote>
yes, only for C++. <br>
<br>
<br>
-Laura<br>
</body>
</html>