This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: iomanip problem
- To: xiao at cmold dot com
- Subject: Re: iomanip problem
- From: Carlo Wood <carlo at runaway dot xs4all dot nl>
- Date: Fri, 24 Jul 1998 02:50:59 +0200 (CEST)
- Cc: egcs at cygnus dot com (egcs at cygnus dot com)
| I installed libstdc++.so.2.9. Actually I updated my copy of egcs by CVS and
| rebuilt the whole stuff. But the same problem persists. Any advice?
|
| Thanks.
Well, its a fact that that template is defined in stdc++, you can see
that with `nm'. You can use `ldd' to check if you link with the right
stdc++. If you are 100% sure that you link (at RUN time) with the correct
library (ie, rename all other libstdc++.* libs to away.libstdc++.*, and
"ldd a.out" shows you link with the correct stdc++ (the one for which
`nm' tells you that your template is defined)) and you still get this
linking error, then I would be surpriced :)
Example:
My custom lib has it undefined too:
~/c++/libr/src/kernel/tests>nm -C /home/carlo/c++/libr/lib/libr.so.0 | grep 'ostream.*smanip<int>'
U ostream & operator<<<int>(ostream &, smanip<int> const &)
I link with:
~/c++/libr/src/kernel/tests>ldd alarm_tst
libr.so.0 => /home/carlo/c++/libr/lib/libr.so.0 (0x40000000)
libstdc++.so.2.9 => /usr/local/egcs-cvs/lib/libstdc++.so.2.9 (0x40065000)
libm.so.6 => /lib/libm.so.6 (0x400a7000)
libc.so.6 => /lib/libc.so.6 (0x400c0000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)
It is defined in:
~/c++/libr/src/kernel/tests>nm -C /usr/local/egcs-cvs/lib/libstdc++.so.2.9 | grep 'ostream.*smanip<int>'
00023854 T ostream & operator<<<int>(ostream &, smanip<int> const &)
--
Carlo Wood <carlo@runaway.xs4all.nl>