Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Nov 2002 19:07:22 -0800
From:      Cy Schubert - CITS Open Systems Group <Cy.Schubert@uumail.gov.bc.ca>
To:        "Matthew Emmerton" <matt@gsicomp.on.ca>
Cc:        "Garrett Rooney" <rooneg@electricjellyfish.net>, freebsd-current@FreeBSD.ORG
Subject:   Re: C++ Issue On -CURRENT 
Message-ID:  <200212010307.gB137M9V036691@cwsys.cwsent.com>
In-Reply-To: Message from "Matthew Emmerton" <matt@gsicomp.on.ca>  of "Sat, 30 Nov 2002 19:48:39 EST." <002501c298d3$63c3c150$1200a8c0@gsicomp.on.ca> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <002501c298d3$63c3c150$1200a8c0@gsicomp.on.ca>, "Matthew 
Emmerton" w
rites:
> > In message <7DAE546B-04BE-11D7-9FE8-00039364885A@electricjellyfish.net>
> > , Garret
> > t Rooney writes:
> > > > The following program builds and runs under 4.7-STABLE:
> > > >
> > > > #include <iostream>
> > > >
> > > > int main()
> > > > {
> > > >         cout<<"Hello World\n";
> > > > }
> > > >
> > > > ... but under 5.0-CURRENT it gives me the following errors:
> > > >
> > > > cwtest$ g++ -o foo foo.cc
> > > > foo.cc: In function `int main()':
> > > > foo.cc:5: `cout' undeclared (first use this function)
> > > > foo.cc:5: (Each undeclared identifier is reported only once for each
> > > > function
> > > >    it appears in.)
> > >
> > > does the problem still occur if you add in 'using namespace std'?
> >
> > Thanks. That also fixed it.
> 
> You will also get these sorts of errors if you've got stale g++ headers in
> /usr/include/g++.  Make sure that you clean out this directory before doing
> an installworld.

My email that started this thread stated that I had already done this. 
Actually, I had done this months ago when I installed current on my new 
(well... old) testbed. I did it yet again (and reinstalled world) just 
to make sure I did it right.


--
Cheers,                          Phone:  250-387-8437
Cy Schubert                        Fax:  250-387-5231
Team Leader, Sun/Alpha Team      Email:  Cy.Schubert@osg.gov.bc.ca
Open Systems Group, CITS
Ministry of Management Services
Province of BC            
                    FreeBSD UNIX:  cy@FreeBSD.org




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212010307.gB137M9V036691>