I forward to the list the message I just got from Ben. It seems that
RH7.1 sstream wants to use
lyxstring::replace (size_t &, const size_t &, int &)
and this does not exist. Are we supposed to implement this? This seems
strange to me.
Ben, what is the relevant extract of <sstream> (around line 194)?
JMarc
------- Start of forwarded message -------
Date: Wed, 23 May 2001 08:31:01 +1000
From: Ben Stanley <[EMAIL PROTECTED]>
To: Jean-Marc Lasgouttes <[EMAIL PROTECTED]>
Subject: Re: [PATCH] Compiling lyx-1.1.6fix1 on RH 7.1
Jean-Marc Lasgouttes wrote:
>>>>>>"Ben" == Ben Stanley <[EMAIL PROTECTED]> writes:
>>>>>>
>
>Ben> The attached patch is equivalent to my first attempted fix :-( It
>Ben> didnt' work...
>
>Ben> If you use LString.h but also try to use <sstream>, then
>Ben> <sstream> will use <string> internally, but lyx will be using
>Ben> LString... this causes trouble.
>
>I routinely compile main cvs with compaq cxx (which has sstream) and
>lyxstring, and this works well. I have to admit though that I did not
>try 1.1.6 recently. Could you send me a list of errors that you get?
>
>JMarc
>
Sorry to be so late with this - I've actually downloaded the
lyx-1.1.6fix2 srpm and tried to compile that.
Here are the errors:
gcc -DHAVE_CONFIG_H -I. -I. -I../../src -I../../images -I./../ -I../..
-I../.. -I../../boost -isystem /usr/X11R6/include -O2 -march=i386
-mcpu=i686 -c formula.C -o formula.o
In file included from ../../src/Lsstream.h:20,
from formula.C:18:
/usr/include/g++-3/sstream: In method `int stringbuf::overflow (int)':
/usr/include/g++-3/sstream:194: no matching function for call to
`lyxstring::replace (size_t &, const size_t &, int &)'
../../src/support/lyxstring.h:427: candidates are: lyxstring
&lyxstring::replace (unsigned int, unsigned int, const lyxstring &)
../../src/support/lyxstring.h:431: lyxstring
&lyxstring::replace (unsigned int, unsigned int, const lyxstring &,
unsigned int, unsigned int)
../../src/support/lyxstring.h:435: lyxstring
&lyxstring::replace (unsigned int, unsigned int, const char *, unsigned int)
../../src/support/lyxstring.h:438: lyxstring
&lyxstring::replace (unsigned int, unsigned int, const char *)
../../src/support/lyxstring.h:442: lyxstring
&lyxstring::replace (unsigned int, unsigned int, unsigned int, char)
../../src/support/lyxstring.h:445: lyxstring
&lyxstring::replace (char *, char *, const lyxstring &)
../../src/support/lyxstring.h:449: lyxstring
&lyxstring::replace (char *, char *, const char *, unsigned int)
../../src/support/lyxstring.h:452: lyxstring
&lyxstring::replace (char *, char *, const char *)
../../src/support/lyxstring.h:456: lyxstring
&lyxstring::replace (char *, char *, unsigned int, char)
../../src/support/lyxstring.h:459: lyxstring
&lyxstring::replace (char *, char *, char *, char *)
make[3]: *** [formula.lo] Error 1
make[3]: Leaving directory `/usr/src/redhat/BUILD/lyx-1.1.6fix2/src/mathed'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/lyx-1.1.6fix2/src'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/lyx-1.1.6fix2/src'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.45522 (%build)
I found that the fix was to use the 'included' <sstream> when using the
included <string>.
Ben.
------- End of forwarded message -------