[GRASS-dev] iostream lib and r.terraflow/r.viewshed

Martin Landa landa.martin at gmail.com
Sun Aug 10 10:10:16 EDT 2008


Hi,

2008/8/10 Paul Kelly <paul-grass at stjohnspoint.co.uk>:

[...]

> Well I know very little about C++, but a very random guess: does adding
> #include <string.h>
> to include/iostream/ami_stream.h help?
> Obviously I can't reproduce the problem myself (gcc 4.1.2 on Slackware 12.0)
> or I wouldn't have committed the changes - perhaps the problem is x86_64
> related?

fixed in trunk/devbr6

http://trac.osgeo.org/grass/changeset/32668

and

http://trac.osgeo.org/grass/changeset/32669

anyway compilation of r.terraflow still fails

c++ -c -I/home/martin/src/grass6_devel/dist.i686-pc-linux-gnu/include
-g -Wall   -DUSER=\"martin\" -DNODATA_FIX -D_FILE_OFFSET_BITS=64
-DPACKAGE=\""grassmods"\" -DELEV_FLOAT common.cc -o
OBJ.i686-pc-linux-gnu/FLOAT/common.o
In file included from
/home/martin/src/grass6_devel/dist.i686-pc-linux-gnu/include/grass/iostream/ami.h:27,
                 from common.h:27,
                 from common.cc:35:
/home/martin/src/grass6_devel/dist.i686-pc-linux-gnu/include/grass/iostream/ami_stream.h:
In constructor 'AMI_STREAM<T>::AMI_STREAM(const char*,
AMI_stream_type)':
/home/martin/src/grass6_devel/dist.i686-pc-linux-gnu/include/grass/iostream/ami_stream.h:256:
error: there are no arguments to 'strcpy' that depend on a template
parameter, so a declaration of 'strcpy' must be available
/home/martin/src/grass6_devel/dist.i686-pc-linux-gnu/include/grass/iostream/ami_stream.h:256:
error: (if you use '-fpermissive', G++ will accept your code, but
allowing the use of an undeclared name is deprecated)
/home/martin/src/grass6_devel/dist.i686-pc-linux-gnu/include/grass/iostream/ami_stream.h:
In member function 'AMI_err AMI_STREAM<T>::name(char**)':
/home/martin/src/grass6_devel/dist.i686-pc-linux-gnu/include/grass/iostream/ami_stream.h:373:
error: there are no arguments to 'strlen' that depend on a template
parameter, so a declaration of 'strlen' must be available
/home/martin/src/grass6_devel/dist.i686-pc-linux-gnu/include/grass/iostream/ami_stream.h:374:
error: there are no arguments to 'strcpy' that depend on a template
parameter, so a declaration of 'strcpy' must be available
make: *** [OBJ.i686-pc-linux-gnu/FLOAT/common.o] Error 1

Martin

-- 
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *


More information about the grass-dev mailing list