This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: iomanip problem


You link not or with the wrong libstdc++.
This template is defined in libstdc++.so.2.9.

>nm -C /usr/local/egcs-cvs/lib/libstdc++.so.2.9 | grep 'ostream.*smanip<int>'
00023854 T ostream & operator<<<int>(ostream &, smanip<int> const &)

If you are using egcs-1.0.x, then the lib is still called libstdc++.so.2.8,
make sure to use the right lib :/

-- 
 Carlo Wood  <carlo@runaway.xs4all.nl>

| Hi there:
| 
| I am trying to use some functions in the iomanip.h wigh egcs.  The compile of
| the program seems to be ok.  But the linking stage produces error messages like
| the following one:
| 
| xxx.o:xxx.hpp:line number:undefined reference to `operator<<(ostream &,
| smanip<int> const &)'
| 
| The undefined reference is setw().
| 
| Anybody has any hints?
| 
| Thanks.
| 
| -- 
| 
| Xiaomao
| 
| =================================================================
| Xiaomao (Mark) Xiao                  E-Mail: xiao@cmold.com
| C-MOLD                                  TEL: (607) 257-4949 x 699
| 31 Dutch Mill Road                      FAX: (607) 257-6355
| Ithaca, NY 14850                        URL: http://www.cmold.com
| =================================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]