From: Paul Moore (gustav_at_[hidden])
Date: 2000-05-16 16:37:28


From: John Maddock [mailto:John_Maddock_at_[hidden]]
> Try adding the SGI STL to your include path,

No good - I get "no class template named 'iterator' in 'std'" - presumably
because of problems with the g++ non-implementation of the std namespace
(the -fhonor-std flag fails as the mingw libraries aren't built with it).

C:\rational>c++ -I../.. -ISTL rational_example.cpp
In file included from ..\..\boost\rational.hpp:27,
                 from rational_example.cpp:16:
..\..\boost\operators.hpp:393: no class template named `iterator' in `std'
..\..\boost\operators.hpp:406: no class template named `iterator' in `std'
..\..\boost\operators.hpp:425: no class template named `iterator' in `std'
In file included from rational_example.cpp:16:
..\..\boost\rational.hpp:101: warning: friend declaration `class
boost::rational<IntType> boost::abs
(const boost::rational<IntType> &)'
..\..\boost\rational.hpp:101: warning: declares a non-template function
..\..\boost\rational.hpp:101: warning: (if this is not what you intended,
make sure
..\..\boost\rational.hpp:101: warning: the function template has already
been declared,
..\..\boost\rational.hpp:101: warning: and add <> after the function name
here)
..\..\boost\rational.hpp:101: warning: -Wno-non-template-friend disables
this warning.

> alternatively you could try installing either the STLPort,

I tried without the stdio implementation (latest beta STLport) as the
library builds break horribly for me. The stlport seems to want to find the
g++ headers in a directory 'g++' in a path relative to where the stlport was
installed (contrary to the documentation!) - and even if I installed stlport
in the Mingw directories, things like iostream.h are in a directory 'g++-3',
not 'g++'.

C:\rational>c++ -I../.. -I/DATA/STLport-4.0b6/stlport rational_example.cpp
In file included from \DATA\STLport-4.0b6\stlport\wrap_std\iostream:30,
                 from \DATA\STLport-4.0b6\stlport\iostream:70,
                 from rational_example.cpp:11:
\DATA\STLport-4.0b6\stlport\wrap_std\h\iostream.h:1: ..\g++\iostream.h: No
such file or directory
In file included from \DATA\STLport-4.0b6\stlport\iostream.h:104,
                 from \DATA\STLport-4.0b6\stlport\wrap_std\iosfwd:64,
                 from \DATA\STLport-4.0b6\stlport\iosfwd:45,
                 from \DATA\STLport-4.0b6\stlport\stl\_string_fwd.h:22,
                 from \DATA\STLport-4.0b6\stlport\stdexcept:45,
                 from ..\..\boost\rational.hpp:25,
                 from rational_example.cpp:16:
\DATA\STLport-4.0b6\stlport\wrap_std\h\iostream.h:1: ..\g++\iostream.h: No
such file or directory
In file included from \DATA\STLport-4.0b6\stlport\fstream.h:34,
                 from \DATA\STLport-4.0b6\stlport\wrap_std\iosfwd:65,
                 from \DATA\STLport-4.0b6\stlport\iosfwd:45,
                 from \DATA\STLport-4.0b6\stlport\stl\_string_fwd.h:22,
                 from \DATA\STLport-4.0b6\stlport\stdexcept:45,
                 from ..\..\boost\rational.hpp:25,
                 from rational_example.cpp:16:
\DATA\STLport-4.0b6\stlport\wrap_std\h\fstream.h:1: ..\g++\fstream.h: No
such file or directory

> or the latest beta of the upcoming full SGI/GNU standard library.

Tried that, but got "not configured for this operating system". Looking at
the source, it means what it says - there isn't a setup for gcc/mingw (yet?)

C:\rational>c++ -I../.. -ISTL rational_example.cpp
In file included from STL\streambuf:23,
                 from STL\ostream:23,
                 from STL\istream:21,
                 from STL\iostream:22,
                 from rational_example.cpp:11:
STL\stl_stdio_file.h:163: #error The C++ I/O library is not configured for
this operating system

Sorry - this is way off-topic, but I'd REALLY like to be able to use
gcc/mingw on Windows as an alternative c++ compiler. But I just can't get it
to work (by "work", I mean providing something like a conforming standard
library). People keep saying that it is possible, but I've never been able
to get it to work. I have the latest mingw snapshot, and I've asked on the
mingw and STLport mailing lists among other places. If *anyone* can give me
a step-by-step description of how to get any of the public C++ standard
libraries working with mingw, I would be eternally grateful.

John, I'll look into, and sort out, your other reports on the rational
library soon.

Thanks,
Paul.