[geos-devel] Portability

Ferdinando Villa fvilla at zoo.uvm.edu
Fri Sep 13 12:05:38 EDT 2002


On Fri, 2002-09-13 at 12:02, Martin Davis wrote:
> Now more than ever I'm happy that we developed GEOS (JTS) originally in Java....
> 
> Using a namespace of "geos" sounds like a good idea to me.
> 
> So if we removing "using namespace std", what do we do instead?  Prefix all the STL classes with "std:"?  Or do we even need it?

it's not really a big issue, but the kosher approach would be to prefix
all STL stuff with std:: in the headers, and 'using namespace std' in
the source files. Otherwise including the headers could cause naming
conflicts to someone who's not using the stl and wants to use the same
identifiers. The fact that most C++ programs use it makes it a small
issue, but it's sensible programming practice nevertheless.

> 
> [ Sigh...  my C++ expertise is obviously getting woefully out of date.  (But you know what - I'm not sure how much I care, now that the world has two simpler solutions which appear to have no loss in expressive power). ]
> 
> As for the other compatibility problems, is using STLPort the best solution for MSVC developers to ensure compatibility?  Or would it better to cross compile with gcc Ver 3.2 ?
> 
> Martin Davis, Senior Technical Specialist
> Vivid Solutions Inc.
> Suite #1A-2328 Government Street   Victoria, B.C.   V8T 5G5
> Phone: (250) 385 6040    Fax: (250) 385 6046
> EMail: mbdavis at vividsolutions.com  Web: www.vividsolutions.com
> 
> 
> > -----Original Message-----
> > From: Ferdinando Villa [mailto:fvilla at zoo.uvm.edu]
> > Sent: Friday, September 13, 2002 5:49 AM
> > To: GEOS developers
> > Subject: Re: [geos-devel] Portability
> > 
> > 
> > I strongly agree on the namespace issue (particularly so since we can
> > use a nice namespace id such as 'geos'). I'd also like to see 
> > the 'using
> > namespace std' removed from the headers, not that it matters 
> > much if the
> > namespace is std, but it's very bad practice in general. 
> > 
> > Norman - if you need libtool-related mods that won't break the Unix
> > build, please feel free to commit them.
> > 
> > ciao f
> > 
> > On Fri, 2002-09-13 at 08:58, Norman Vine wrote:
> > > Hi All,
> > > 
> > > Ferdinando's libtoolizing seems to work well for me, with
> > > only minor modifications, on Cygwin and Mingw32, however
> > > I haven't had much joy trying to get this to compile with either
> > >  gcc version 2.95.3-10 (cygwin special)
> > >    or the MUCH more  standard compliant but pickier
> > >  gcc version 3.2 (mingw special 20020817-1)
> > > 
> > > If I can be so bold migh I suggest that the MSVC developers 'try' 
> > > compiling this using the STL_PORT Library occasionally :-)
> > > 
> > > Another suggestion is that we use the C++ namespace feature.
> > > I think that this would greatly enhance the usability of this code
> > > esp. given the 'reasonably common' classnames that are being 
> > > used
> > > 
> > > Cheers
> > > 
> > > Norman
> > > 
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > geos-devel mailing list
> > > geos-devel at geos.refractions.net
> > > http://geos.refractions.net/mailman/listinfo/geos-devel
> > -- 
> > ferdinando villa, ph.d.                    associate professor
> > gund institute for ecological economics, university of vermont
> > 590 main street, burlington, vt 05405    phone: (802) 656-2972
> > 
> > 
> > _______________________________________________
> > geos-devel mailing list
> > geos-devel at geos.refractions.net
> > http://geos.refractions.net/mailman/listinfo/geos-devel
> > 
> 
> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel
-- 
ferdinando villa, ph.d.                    associate professor
gund institute for ecological economics, university of vermont
590 main street, burlington, vt 05405    phone: (802) 656-2972





More information about the geos-devel mailing list