From: Pete Barrie <peter@cis.strath.ac.uk>
To: "Kayvan A. Sylvan" <kayvan@sylvan.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: cygwin gcc 3.0.4 problem
Date: Sun, 10 Mar 2002 14:08:00 -0000 [thread overview]
Message-ID: <5.1.0.14.0.20020310220746.0233e298@pophost.cs.strath.ac.uk> (raw)
In-Reply-To: <20020310210211.GB24965@satyr.sylvan.com>
At 13:02 10/03/2002 -0800, Kayvan A. Sylvan wrote:
>On Sun, Mar 10, 2002 at 08:28:48PM +0000, Pete Barrie wrote:
> >
> > Win2000 Cygwin 1.3.10-1 binutils 2.11.2
> >
> > Hi. I've just built 3.0.4 native on Cygwin. Build seemed to
> > go fine and I can compile/run C prog hello.c
> >
> > However C++ hello.cpp fails as shown below. Is this something
> > trivial I am missing?
> >
> > Thanks for any help
> >
> > Pete
> >
> > $ cat hello.cpp
> > #include <iostream.h>
> >
> > int main ()
> > {
> > cout << "Hello World!";
> > return 0;
> > }
>
>Your problem is probably due to needing to give your gcc3 (in /usr/local/bin)
>the path to the right libstdc++
>
>Try:
>
>/usr/local/bin/g++ -o foo foo.cpp -L/usr/local/lib
>
>In my case, this works for me:
>
>/usr/local/gcc3/bin/g++ -o foo foo.cpp -L /usr/local/gcc3/lib
Yes, this works.
>Also, interestingly, the latest CVS version of gcc-3 produces the following
>message:
>
>/usr/local/gcc3-cvs/bin/g++ -o foo3 foo.cc -L /usr/local/gcc3-cvs/lib
>
>In file included from
>/usr/local/gcc3-cvs/include/g++-v3/backward/iostream.h:31,
> from foo.cc:1:
>/usr/local/gcc3-cvs/include/g++-v3/backward/backward_warning.h:32:2:
>warning: #warning This file includes at least one deprecated or antiquated
>header. Please consider using one of the 32 headers found in section
>17.4.1.2 of the C++ standard. Examples include substituting the <X> header
>for the <X.h> header for C++ includes, or <sstream> instead of the
>deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
>
>This is fixed by changing foo.cpp to the modern C++ style:
>
>#include <iostream>
>
>using std:: cout; using std::endl;
>
>int main ()
>{
> cout << "Hello World!" << endl;
> return 0;
>}
Point taken. Thanks very much for your help.
Pete
> ---Kayvan
>--
>Kayvan A. Sylvan | Proud husband of | Father to my kids:
>Sylvan Associates, Inc. | Laura Isabella Sylvan | Katherine Yelena (8/8/89)
>http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)
prev parent reply other threads:[~2002-03-10 22:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-10 12:29 Pete Barrie
2002-03-10 12:58 ` Oscar Fuentes
2002-03-10 13:03 ` Oscar Fuentes
2002-03-10 13:02 ` Kayvan A. Sylvan
2002-03-10 14:08 ` Pete Barrie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.1.0.14.0.20020310220746.0233e298@pophost.cs.strath.ac.uk \
--to=peter@cis.strath.ac.uk \
--cc=gcc-help@gcc.gnu.org \
--cc=kayvan@sylvan.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).