[www-amaya-dev]Re: problem with a recent commit

On Wednesday 06 December 2006 18:28, Regis Boudin wrote:
> Hi,
>
> Trying to build yesterday, I was hit by a problem in the file
> amaya/wxdialog/PreferenceDlgWX.cpp
>
> With the latest patch (version 1.58), if DAV is disabled but TEMPLATES
> enabled, p_notebook is not declared, and the compilation fails. I'm not
> sure which is the proper fix, though (probably adding an "#ifndef
> TEMPLATES" or similar somewhere, I guess).

This problem should be fixed now.
(Patch)
- #ifndef DAV
- #ifndef TEMPLATES
+ #if !defined(DAV) || !defined(TEMPLATES)
   wxNotebook * p_notebook = XRCCTRL(*this, "wxID_NOTEBOOK", wxNotebook);
+ #endif /* DAV || TEMPLATES */
- #endif
- #endif

>
> By the way, I fail to see the reasons for this around line 693 in
> configure.in :
> ----------------------------------------------------
> # force C mode (-x c)
> CFLAGS="${CFLAGS} -x c"
>
> # C++ options (-x c++)
> CXX_OPTIONS="-D__cplusplus"
> CXXFLAGS="${CXXFLAGS} -Wall -x c++ ${CXX_OPTIONS}"
> ----------------------------------------------------
>
> "-Wall" is certainly useful (and would probably be worth adding to
> CFLAGS), but the "-x c" and "-x c++" look a bit strange to me, as they
> force C for a C compiler and C++ for a C++ compiler. It is useless unless
> you have files with the wrong extension, which I don't think is the case
> as I could build without them.
> The "-D__cplusplus" is even less expected, as the ISO standard requires
> that it is defined anyway when compiling C++ anyway.
>
> Is there a reason replacing the whole thing with
> --------------------------------
> CFLAGS="${CFLAGS} -Wall"
> CXXFLAGS="${CXXFLAGS} -Wall"
> --------------------------------
> wouldn't work ? Maybe some issue I'm not aware of, or problems on MacOS X ?

Option "-x c" requires to compile the source as C code and option "-x c++" 
requires to compile the source as C++ code.
We need the "-x c" almost for thotlib compilers and  "-x c++" for C++ code.

> Oh, and in Makefile.in, the lines about LIBPNG and LIBJPEG can be safely
> removed, these variables are never used.
>
> And for information, I now have a set of patch which allows me to
> automatically enable/build/link redland and raptor, with the builtin and
> the shared versions, and another one to use a shared libWWW. Though I
> already had these features before, they are now done in a different way so
> they can be merged into CVS at some point. They need a bit of polishing,
> but the structure is cleaner.

To check if it really works well, could you try to parse a document with 
entities within attribute values. If I remember, we added a patch in the 
expat version included in libwww.

Regards
     Irène.
-----
Irène Vatton                     INRIA Rhône-Alpes
INRIA                               ZIRST
e-mail: Irene.Vatton@inria.fr       655 avenue de l'Europe
Tel.: +33 4 76 61 53 61             Montbonnot
Fax:  +33 4 76 61 52 07             38334 Saint Ismier Cedex - France

Received on Thursday, 7 December 2006 08:58:32 UTC