> From: Keith Packard <kei...@keithp.com> > Cc: mesa3d-dev@lists.sourceforge.net > To: Ian Romanick <i...@freedesktop.org> > Date: Wed, 07 Jan 2009 12:03:35 -0800 > Subject: Re: [Mesa3d-dev] C++ in Mesa? > > On Wed, 2009-01-07 at 11:45 -0800, Ian Romanick wrote: > > > That was kind of the original question. Is there an ABI issue? The > > only way for applications to get at the GLSL compiler is through the > > GL interface. The GL interface is entirely C-based and *must* remain > > unchanged. The application has no way to know what we used for the > > internals. Technically, we ought to be able to do it in Cobol, but we > > don't hate ourselves that much. > > Using C++ will be visible to applications as you'll be pulling in C++ > libraries and all of their ABI problems.
I believe it's possible to use a "safe" subset of C++ such that no libraries are required. If you avoid exceptions, RTTI, the C++ standard library functions, and new/delete, you should be able to avoid depending on the library in most toolchains, and in some cases you may be able to use some of these features (e.g. you can overload the new and delete operators to avoid depending on the library versions, but then you have to do some linker jiggery-pokery to avoid symbol clashes). The other problem is that you then have to work out the magic incantations for each compiler/linker to avoid it linking in libstdc++ or equivalent anyway. Bruce -- Dr Bruce Merry bmerry <@> gmail <.> com http://www.brucemerry.org.za/ http://blog.brucemerry.org.za/ Millihelen, n: Amount of beauty needed to launch one ship. ------------------------------------------------------------------------------ Check out the new SourceForge.net Marketplace. It is the best place to buy or sell services for just about anything Open Source. http://p.sf.net/sfu/Xq1LFB _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev