Angus Leeming <[EMAIL PROTECTED]> writes:

| cxx -std strict_ansi -DHAVE_CONFIG_H -I. -I../../src -I. -I../../boost   
|-I/usr/local/include    -nopure_cname -nocleanup -msg_display_number -msg_disable 
|11,193,236,261,401,445,450,611 -w1 -ptr 
|/usr/users/aleem/OTHERS_CODE/lyx/devel/build-xforms/lyx_cxx_repository -O2 
|-DLYX_DIR=\"/usr/local/share/lyx-1.3.0cvs\" \
|   -DTOP_SRCDIR=\"../..\" -c ../../src/lyx_main.C
| cxx: Error: ../../src/lyx_main.C, line 356: #434 a reference of type "char *&"
|           (not const-qualified) cannot be initialized with a value of type
|           "char [30]"
|                         lyxerr << boost::format(_("Using built-in default %1$s but 
|expect problems.")) % LYX_DIR
| 
|---------------------------------------------------------------------------------------------------------^
>
| Lars, this fixes the problem, but perhaps you know of a better way?

No, not off-hand... but I think you have stumpled on a compiler bug.

One nice way to fix it though is to make LYX_DIR not be a define, but
a 

static char const * const LYX_DIR = "";

instead. That should fix the problem cleanly.
(if you are able to use this approach, I would prefere that)

| Angus
>
| Index: ChangeLog
| ===================================================================
| RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
| retrieving revision 1.979
| diff -u -p -r1.979 ChangeLog
| --- ChangeLog   21 Nov 2002 19:50:35 -0000      1.979
| +++ ChangeLog   22 Nov 2002 09:54:32 -0000
| @@ -1,3 +1,7 @@
| +2002-11-22  Angus Leeming  <[EMAIL PROTECTED]>
| +
| +       * lyx_main.C (init): boost::format compile fix.
| +
|  2002-11-21  John Levon  <[EMAIL PROTECTED]>
>
|         * pspell.C: fix compile
| Index: lyx_main.C
| ===================================================================
| RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyx_main.C,v
| retrieving revision 1.127
| diff -u -p -r1.127 lyx_main.C
| --- lyx_main.C  21 Nov 2002 18:33:05 -0000      1.127
| +++ lyx_main.C  22 Nov 2002 09:54:33 -0000
| @@ -353,7 +353,7 @@ void LyX::init(bool gui)
|                                         << "Giving up." << endl;
|                                 exit(1);
|                         }
| -                       lyxerr << boost::format(_("Using built-in default %1$s but 
|expect problems.")) % LYX_DIR
| +                       lyxerr << boost::format(_("Using built-in default %1$s but 
|expect problems.")) % static_cast<char *>(LYX_DIR)
|                                << endl;
|                 } else {
|                         lyxerr << _("Expect problems.") << endl;
>

-- 
        Lgb

Reply via email to