[lug] RH 9.x and g++ compiles

Scott Herod herod at dimensional.com
Mon Jun 2 09:05:30 MDT 2003


On 31 May 2003, Michael J. Hammel wrote:

> On Sat, 2003-05-31 at 20:08, Peter Hutnick wrote:
> > Are you (or your make file, or build script, or whatever) using the
> > command "gcc" or "g++"?  The command gcc will try to build your C++ file
> > as a C file, and /minimally/ fail because the C++ standard library won't
> > be available.
> 
> The compile step is using g++.  The link step is using gcc.  I can check
> how to switch to g++ for linking.  I'd always thought it didn't matter
> which you used during linking, but maybe that's wrong.  I can certainly
> try it.

Hi Michael.

Glad to see that making the link step used g++ worked for you.  At work I
argue that we should use gcc for everything and link with libstdc++ when
using C++ functions.  (I think that the only difference in the link is
that g++ automatically adds -lstdc++.)

Scott




More information about the LUG mailing list