cygwin gcc 3.0.4 problem
Pete Barrie
peter@cis.strath.ac.uk
Sun Mar 10 14:08:00 GMT 2002
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)
More information about the Gcc-help
mailing list