Re: [ROOT] Root Conflicts with Windows

From: Matthew D. Langston (langston@SLAC.stanford.edu)
Date: Wed Sep 27 2000 - 17:59:03 MEST


Hi Fons,

I completely agree with you.  The issue of the "MS global namespace macro
pollution problem" really is as bad as you describe.  As you may know, the
way MS has gotten around this issue is to move to a component programming
model where language features which can in principal be abused (like CPP
macros, for which MS set new standards in abuse) are a non-issue.  MS
"fixed" their macro pollution problem by applying this level of indirection.

This is how I got around these problems under Windows.  I created COM+
interfaces for the ROOT classes that I needed to access.  Perhaps you and
Rene may want to explore providing component interfaces for your Windows
users?

As far as the "ROOT + namespace" issue, which compilers that ROOT supports
don't support namespaces?  To the best of my knowledge, all of the compilers
listed on  http://root.cern.ch/root/Version225.html support namespaces.
Which ones don't?

Regards, Matt

----- Original Message -----
From: "Fons Rademakers" <Fons.Rademakers@cern.ch>
To: "Matthew D. Langston" <langston@SLAC.Stanford.EDU>
Cc: "Fons Rademakers" <Fons.Rademakers@cern.ch>; "Dr. D. Sideris"
<d.sideris@ic.ac.uk>; <roottalk@pcroot.cern.ch>
Sent: Wednesday, September 27, 2000 2:59 AM
Subject: Re: [ROOT] Root Conflicts with Windows


> Hi Matt,
>
>    like discussed in this thread there are two independent issues at
> stake. First MS has the habit to create defines for absolutely trivial
> words (like #define Create CreateA) making sure that all code using the
> word Create will be morphed and will fail to compile. To be safe one has
to
> create files which #undef half of all know common english words.
>
> The other issue is about namespaces. Here we fully agree that ROOT should
> use its own namespace and in the future we will do that (maybe in v3.0).
> However we will only do that once ALL C++ compilers we use will support
> this feature. We don't want to ifdef this feature depending on which
> compiler is being used. Vendors are converging on ANSI C++ so I don't
> forsee to much problems for the near future. But for now it is not
> yet true.
>
>
> Cheers, Fons.
>
>
> On Tue, Sep 26, 2000 at 08:22:03AM -0700, Matthew D. Langston wrote:
> > Hi Fons,
> >
> > The ROOT libraries really should be in their own namespace.  All of the
> > compilers which you provide binaries for support namespaces, do they
not?
> >
> > I occasionally, but consistently,  run into namepsace conflicts too.  In
my
> > own case it is not with system libraries, but with third party libraries
> > (i.e. user code).
> >
> > Why not put each release of ROOT into a separate namespace, i.e.
> >
> > namespace ROOT_2_25_03
> > {
> >    ...
> > }
> >
> > Regards, Matt
> >
> > ----- Original Message -----
> > From: "Fons Rademakers" <Fons.Rademakers@cern.ch>
> > To: "Dr. D. Sideris" <d.sideris@ic.ac.uk>
> > Cc: <roottalk@pcroot.cern.ch>
> > Sent: Tuesday, September 26, 2000 5:39 AM
> > Subject: Re: [ROOT] Root Conflicts with Windows
> >
> >
> > > Hi Dimitris,
> > >
> > >    what are the conflicts you see? Which symbols. ROOT does not have
> > > conflicts with Win32 and MFC.
> > >
> > > Cheers, Fons.
> > >
> > >
> > > On Tue, Sep 26, 2000 at 12:34:24PM +0100, Dr. D. Sideris wrote:
> > > > Dear Root team, I'm trying to incorporate root in my c++ windows NT
AFC
> > application. There seem to be major conflicts between the libraries of
root
> > and windows. The suggested solution on the root documentation is to wrap
> > root inside a class. But this implies effective manual renaming of every
> > single call to root functions. This is clearly a serious problem
especially
> > since ms windows is officially supported by the root team. I hope there
is
> > intention to solve this problem in the next version of root.
> > > >
> > > > Regards
> > > >
> > > > Dimitris Sideris
> > > > Imperial College London
> > >
> > > --
> > > 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 7677910
> > >
>
> --
> 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 7677910
>



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:33 MET