This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
porting to libstdc++-v3 (<iostream.h> etc.)
- To: libstdc++ at sourceware dot cygnus dot com
- Subject: porting to libstdc++-v3 (<iostream.h> etc.)
- From: Felix Natter <fnatter at gmx dot net>
- Date: 17 Apr 2000 17:27:01 +0200
hi,
I am using v3 for some programs and since it's not too hard, I usually
try to convert some libraries to get along with v3.
in my experience this implies:
1. namespace std:
- add namespace std { ... } for declarations,
and using namespace std; for definitions
- export CXXFLAGS=-fhonor-std
2. some header-changes:
- i.e.: #include <ctype.h> => #include <cctype>
3. fix a few syntax-errors, i.e. (from Gtk---1.0.3/gdk--/gdk--/gc.cc):
In the following function I had to add a cast because gcc-2.95.2 complained
about "changed signedness":
------------------------------------------------------------
void Gdk_GC::set_dashes(gint dash_offset,
gchar dash_list[],
gint n)
{
gdk_gc_set_dashes(*this,dash_offset,(signed char*)dash_list,n);
}
------------------------------------------------------------
(sorry if this is offtopic, I don't know what might cause this..)
I am wondering whether libstdc++-v3 will add symlinks for the *.h-headers,
i.e. iostream.h->iostream ?
I think it will be a big problem to add an autoconf-check for each
libstdc++- header...
Of course I'd like to integrate these changes into the official version, so
I would appreciate any experience somebody may have:
for example, how should I decide whether ncurses++ (or Gtk--) should
be in std:: (and not just using ::std) ?
I am already working on converting ncurses++ (5.0) and Gtk-- (1.0.3).
Maybe someone on this list could look into the unstable Gtk-- ?
(I would have done it, but have not been able to find "libsigc++"..)
thanks,
--
Felix Natter