Lars,
I get several undefined references like this one with current trunk (gcc
3.3.5, 32 bit):
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 &?
2) Do you have any idea what goes wrong here? It looks like the substr does
not return a docstring, otherwise it should work?
Georg