(Allan, could you confirm that PrinterParams::composite is
meant to read from/ write to the members of PrinterParams?)

Here's how to compile the src/frontends/xforms/ directory
of the rae branch with egcs-1.1.2/gnu STL.

STEP 1: Edit configure and edit lines 1854, 1855:
-      *2.91.*) CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
-      *)         CXXFLAGS="-g $lyx_opt -fno-rtti -fno-exceptions";;
+      *)         CXXFLAGS="-g $lyx_opt";;

STEP 2:
configure --without-included-string

STEP 3:
make

NOTE 1. The usual "-fno-rtti -fno-exceptions" causes
compilation to fall over in FormPrint with an internal
compiler error.

NOTE 2. The usual (default) "configure --with-included-string" 
produces the following error:

In file included from /usr/local/egcs/include/g++/stdexcept:36,
from ../../../src/xtl/objio.h:34,
                 from ../../../src/support/lxtl.h:19,
                 from ../../../src/PrinterParams.h:18,
                 from FormPrint.C:14:
/usr/local/egcs/include/g++/string:9: conflicting types for `typedef class 
basic_string<char,string_char_traits<char>,__default_alloc_template<false,0> > string'
../../../src/LString.h:20: previous declaration as `typedef class lyxstring string'

NOTE 3. This configure option ("--without-included-string")
will cause compilation to FAIL in the main src/ directory:

g++ -DHAVE_CONFIG_H -I. -I. -I../../src -I../../images -I./../ -g -O -ansi -W -Wall 
-Wno-return-type -Wp,-MD,.deps/formula.pp -c formula.C -o formula.o
formula.C: In method `void InsetFormula::display(bool)':
formula.C:583: no matching function for call to `string::clear ()'

Nonetheless, compilation of the src/frontends/xforms/
directory IS possible.

NOTE 4. Compiling FormPrint will result in LOTS of warnings:

... [snip many template-type warnings]
../../../src/PrinterParams.h:119: warning: initialization of non-const reference `int 
&' from rvalue `int'
... [snip many template-type warnings]

This can be resolved by editting PrinterParams.h, so:
        template<class Stream>
        void composite(Stream & stream)
                {
+                       int t, wp;
+                       t  = static_cast<int>(target);
+                       wp = static_cast<int>(which_pages);
        
                        stream
+                               .simple(t)
-                               .simple(static_cast<int>(target))
                                .simple(printer_name)
                                .simple(file_name)
+                               .simple(wp)
-                               .simple(static_cast<int>(which_pages))
                                .simple(from_page)
                                .simple(to_page)
                                .simple(reverse_order)
                                .simple(unsorted_copies)
                                .simple(count_copies);
                }

Note, however, that I'm not sure what the effect of this
change is because I haven't yet managed to produce an
executable. Moreover, I think that Allan said that the old
code for the print dialog is still enabled, so these
changes will make no difference!

If the idea of composite() is read from / write to 
"target" and "which_pages" then clearly the write to bit of
this won't work with the change I've made as it is. An
extra couple of lines are needed to pass t to target, etc.

NOTE 5. I'm going home!
Have a good evening,
Angus

Reply via email to