Renaming Symbols cout, cerr, cin, clog
Stefan Vogel
Stefan.Vogel@clarity-ag.net
Wed May 29 08:17:00 GMT 2002
Hi folks,
in our actual work we have to link some librarys which were compiled
with
the native sun forte compiler and librarys have were build with the gcc.
The problem of calling methods of Objects which have compiled with the
other compiler we solved with the help of c-interface wich is
automaticly
generated witch an extention of swig.
The real problem during this task was that there are 4 objects defined
in
the forte librarys and the gnu stdlibio.a. What I did was renaming (see
diff file)
the defines
cout, cerr, cin and clog
to
gcout, gcerr, gcin and gclog.
In the c++-application nothing have to be changed!
Now it is possible to use shared librarys wich were compiled and linked
with the gcc and librarys and main programs build with the native
compiler.
It is important that the gcc librarys were shared librarys, caused by
the
static objects, which have to be initialized!
So is it possible to rename those symbols in future releases of the
libio!
Regards
Stefan Vogel
Lead Developer
Clarity AG
Niederlassung Frankfurt
Daimlerstr. 32
D-60314 Frankfurt
Tel.: +49 69 / 41 67 4580
Fax: +49 69 / 41 67 4582
Mobil: +49 172 / 21 69 531
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc_diffs
Type: application/octet-stream
Size: 3112 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20020529/8923d876/attachment.obj>
More information about the Libstdc++
mailing list