This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Installation hitch
- To: egcs at cygnus dot com
- Subject: Installation hitch
- From: barney at russell dot ee dot umist dot ac dot uk (Barnaby Pitt)
- Date: Fri, 13 Mar 1998 11:10:51 GMT
Hi.
I've installed egcs-1.0.1 semi-successfully on Sparc-Sun-Solaris2.5.
My problem is that I can't seem to link with some of the standard library
when using -fguiding-decls (which the compiler keeps telling me to use
when I try to compile code developed under gcc-2.7.2).
// test.cc
#include<string>
#include<iostream.h>
#include<iomanip.h>
int main()
{cout << setw(20) << string("Hello World\n");
}
// end test.c
Results:
>g++ -fguiding-decls test.cc
Undefined first referenced
symbol in file
operator<<(ostream &, basic_string<char, string_char_traits<char> > const
&)/var/tmp/cca000ii1.o
operator<<(ostream &, smanip<int> const &)/var/tmp/cca000ii1.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
>g++ test.cc
>a.out
Hello World
>
Is this a known bug?
Can I skirt round it by specifying exactly where to find the
library object files (I've tried building and linking with
bastring.cc but that didn't help)?
What exactly is -fguiding-decls (I don't see it anywhere in the info
pages)?
Any help greatly appreciated.
Barney Pitt, UMIST