|
From: Andy D. <dou...@la...> - 2003-01-17 16:48:47
|
On Fri, 17 Jan 2003 ba...@ph... wrote:
> I tried to install VPython-2002-07-22.tar.gz on a
> debian woody machine, and ran into the following error message:
>
> g++ -I. -I./CXX/Include -I/home/abaecker/PYTHON/include/python2.3
> -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
> -D_REENTRANT -I/usr/X11R6/include -w -c -o platlinux.o platlinux.cpp
> platlinux.cpp:71: `ANY' was not declared in this scope
> platlinux.cpp:71: parse error before `)'
> make: *** [platlinux.o] Error 1
I compiled it just fine on a Debian woody machine. One difference is that
I used python 2.2.2, not python 2.3. I suspect the 2.3 version of python
is what's causing your problem. Go back and install 2.2.2 (or
something similar to that) and you should be fine.
> gcc version 2.95.4 20011002 (Debian prerelease)
I'm using the same one.
> P.S.: g++3.2 even fails earlier:
>
> g++-3.2 -I. -I./CXX/Include -I/home/abaecker/PYTHON/include/python2.3
> -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
> -D_REENTRANT -I/usr/X11R6/include -w -c -o arrow.o arrow.cpp
> In file included from pvector.h:6,
> from cvisual.h:6,
> from display.h:5,
> from prim.h:5,
> from axial.h:5,
> from arrow.cpp:1:
> CXX/Include/CXX_Objects.h:967: no class template named
> `random_access_iterator'
> in `std'
Yes, that's been reported before, and I think there's an #ifdef somewhere
in the visual sources. [poking around...]
If, for some reason, you don't want to take my advice above and use
python-2.2.2, then you can try getting around this particular problem
by changing the line in cvisual/CXX/Include/CXX_Config.h that says
#define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 1
to
#define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 0
and see what happens.
If that doesn't work, try searching the archives of this group -- I
know this problem has been reported before.
More generally, this should ultimately probably be fixed in the cvisual
sources, but I'm not sufficiently familiar with C++ myself to suggest
a fix. Checking out the stl_iterator documentation, I find this about
random_access_iterator:
Defined in the standard header iterator, and in the nonstandard
backward-compatibility header iterator.h. This class is no longer part
of the C++ standard, although it was present in early drafts of the
standard. It is retained in this implementation for backward
compatibility.
And the header file stl_iterator.h has these lines (at least in my version):
// The base classes input_iterator, output_iterator, forward_iterator,
// bidirectional_iterator, and random_access_iterator are not part of
// the C++ standard. (they have been replaced by struct iterator.)
// They are included for backward compatibility with the HP STL.
So it looks like cvisual has run into the problem of shifting
standards :-(.
Anyway, using gcc-2.95 and python-2.2.2 should just work. Unless
you've got a sense of adventure, I'd try that combination first :-).
Hope this helps,
Andy Dougherty dou...@la...
Dept. of Physics
Lafayette College, Easton PA 18042
|