Georg Baum <[EMAIL PROTECTED]> writes:
| Lars,
|
| I get several undefined references like this one with current trunk (gcc
| 3.3.5, 32 bit):
Your gcc is too old, and to fix it we must provide the specialization
fo char_traits<boost::uint32_t> ourselves. Gcc4 has better QoI and
does the work for us.
| frontends/qt3/.libs/libqt3.a(qfont_metrics.o
|
(.gnu.linkonce.t._ZNSbIjSt11char_traitsIjESaIjEE13_S_copy_charsEPjS3_S3_+0x1c):
| In function `std::basic_string<unsigned, std::char_traits<unsigned>,
| std::allocator<unsigned> >::_S_copy_chars(unsigned*, unsigned*,
| unsigned*)':
| qfont_metrics.C: undefined reference to
| `std::char_traits<unsigned>::copy(unsigned*, unsigned const*, unsigned)'
|
| The reason is the commented line here (from qt3/qfont_metrics.C):
|
| int font_metrics::signedWidth(docstring const & s, LyXFont const & f)
| {
| if (s[0] == '-')
| // return -font_metrics::width(s.substr(1, s.length() - 1), f);
| return 0;
| else
| return font_metrics::width(s, f);
| }
|
| font_metrics::width takes a lyx::char_type const * as first argument, and
| somehow the result of the substr can not be converted to that.
|
| 1) Why does font_metrics::width take a lyx::char_type const * and not a
| docstring const &?
heritance from ealier code. (and fits quite well with the
vector<boost::uint32_t> storage in paragraphs.)
| 2) Do you have any idea what goes wrong here? It looks like the substr does
| not return a docstring, otherwise it should work?
Yes. No. Incomplete char_trait.
--
Lgb