Re: [ROOT] Compiling TASImage.cxx

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Wed Mar 26 2003 - 18:58:26 MET


Hi Christian,


On Tue, 2003-03-25 at 19:29, Christian Holm Christensen wrote:
> Hi Fons and Michal, 
> 
> Fons Rademakers <Fons.Rademakers@cern.ch> wrote concerning
>   Re: [ROOT] Compiling TASImage.cxx [14 Mar 2003 19:01:29 +0100] 
> ----------------------------------------------------------------------
> > Hi Michal,
> > 
> >   you should not install libAfterImage with lib afterbase support. 
> 
> Erh, why not? 

Just because of the observations you make below, the afterbase headers
are not C++ proof. Once that has been fixed you can do what you like.

> 
> > Did you install the /usr/local/ version? If yes rebuild, if no get
> > ftp://root.cern.ch/root/libafterimage.tar.gz, untar in your home and
> > build via:
> 
> It's 
> 
>   ftp://root.cern.ch/root/libAfterImage.tar.gz
> 
> (note the capitals). 
> 
> > ./AACONF.linux
> > make
> > 
> > Cheers, Fons.
> > 
> > 
> > 
> > On Fri, 2003-03-07 at 23:15, Michal Lijowski wrote:
> > >  Hi,
> > > 
> > >   I went through several combination of ASImage and ASBase
> > >   libraries as well through the messages in roottalk related to
> > >   this topic and I am still > > stuck with the following errors
> > >   when compiling root with support for ASImage with gcc 3.2 under
> > >   RH Linux 8.0.
> > > 
> > >   I appreciate any suggestions.
> > > 
> > >    Michal
> > > 
> > > g++ -O2 -pipe -Wall -Woverloaded-virtual -fPIC -Iinclude  -D_REENTRANT -I/us
> > > r/local/include/libAfterImage -o asimage/src/TASImage.o -c
> > > asimage/src/TASImage.cxx
> > > In file included from /usr/local/include/libAfterImage/afterbase.h:8,
> > >                  from asimage/src/TASImage.cxx:49:
> > > /usr/local/include/libAfterBase/audit.h:145: parse error before `delete'
> > > make: [asimage/src/TASImage.o] Error 1 (ignored)
> > > g++ -O2 -pipe -Wall -Woverloaded-virtual -fPIC -Iinclude  -D_REENTRANT -I/us
> > > r/local/include/libAfterImage -o asimage/src/TASPaletteEditor.o -c
> > > asimage/src/TASPaletteEditor.cxx
> > > In file included from /usr/local/include/libAfterImage/afterbase.h:8,
> > >                  from asimage/src/TASPaletteEditor.cxx:35:
> > > /usr/local/include/libAfterBase/audit.h:145: parse error before `delete'
> > > make: [asimage/src/TASPaletteEditor.o] Error 1 (ignored)
> 
> The libAfterBase header files are not C++ friendly.  What I did was to
> put into the files that include `libAfterImage/audit.h' the below
> lines that `wrap' it
> 
> 
>   extern "C" { 
>     ...
>     #define delete _delete           // <= Added line 
>     #include <libAfterBase/audit.h> 
>     #undef delete                    // <= Added line 
>     ...
>   }
> 
> It's a hack, but it works. The problem is, that in `audit.h', the word
> `delete' is used as a dummy identifier, which of course isn't allowed
> in C++ (but is in C). 
> 
> I've just written to the maintainer and asked him to please make the
> headers more C++ friendly.  Soon, you'll find Debian GNU/Linux
> packages of libAfterImage (and libAfterBase) on my web-site.
> 
> Yours, 
> 
>  ___  |  Christian Holm Christensen 
>   |_| |	 -------------------------------------------------------------
>     | |	 Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
>      _|	          DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
>     _|	          Denmark                    Office: (+45) 353  25 305
>  ____|	 Email:   cholm@nbi.dk               Web:    www.nbi.dk/~cholm
>  | |
-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET