Mail Archives: djgpp/2001/01/07/07:06:47
Ben Harris wrote:
> Stephen, thanks for the reply.
> Are you aware of any other ICO C++ headers that DJGPP (or its
> associated C++ compiler add-on) is missing?
Yes - the C++ library is very patchy in places. The STL headers are all
present and more-or-less correct, but there are problems with a number
of the other headers. The current development versions of libstdc++
look much better, but I don't think they will work with GCC 2.95.2,
so it's a matter of waiting for GCC 3.0 to be released (and ported to
DJGPP), which is unlikely to happen before March.
STLport would probably fix most of the problems, but I haven't heard
of anyone who has managed to get it to work with DJGPP. (Despite the
name, STLport now covers much more than just the STL. If you want to
try your luck with it, it's available from http://www.stlport.org .)
The most complained about omission in the current GCC C++ library
is <sstream>, but there are at least two free implementations:
http://sources.redhat.com/ml/libstdc++/2000-q2/msg00700/sstream
ftp://ftp.fmi.uni-konstanz.de/pub/algo/personal/kuehl/sstream.tgz
I've been using the first one with DJGPP without problems.
<istream> and <ostream> are also missing, but the istream and ostream
classes are defined in <iostream>, so simply typing
copy iostream istream
copy iostream ostream
in the appropriate directory cures this problem.
Some things are not easily fixable. Those that come to mind are:
(1) The stream classes are defined only in their char specializations
(although this is usually all you need).
(2) The char_traits class template that should be in <string> isn't
there at all.
(3) <locale> is missing.
Also, the headers define everything in the global namespace instead of
in namespace std, but GCC currently uses a nasty kludge that means that
this at least doesn't stop most correct programs from working. In any
case, this problem is fixed in development versions of libstdc++. More
seriously, the DJGPP C headers also have this problem and no-one is
doing anything about it. (I mentioned this on the DJGPP workers list
last month and got zero reaction, otherwise I would have offered to do
it myself.)
Stephen
- Raw text -