This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: undefined reference
- To: martin at mira dot isdn dot cs dot tu-berlin dot de (Martin von Loewis)
- Subject: Re: undefined reference
- From: Carlo Wood <carlo at runaway dot xs4all dot nl>
- Date: Tue, 21 Jul 1998 14:43:27 +0200 (CEST)
- Cc: egcs at cygnus dot com (egcs at cygnus dot com)
| > =============================================================================
| > The error message is:
| > /tmp/cca005831.o: In function `operator<<(ostream &, MyTest<float> const &)':
| > /tmp/cca005831.o(.text+0x61): undefined reference to `operator<<(ostream &, smanip<int> const &)'
| >
| > =============================================================================
| > The compile command is:
| > gcc -fguiding-decls -fno-implicit-templates junk.cpp -L/usr/local/lib -lstdc++ -o junk
| >
| > Could anybody tell me what I should do to make this piece of code
| > work? Thanks in advance.
|
| Omit both -fguiding-decls and -fno-implicit-templates when
| compiling. You should not need them.
|
| If you absolutely want to use explicit instantiation, please read the
| g++ FAQ for details.
|
| Regards,
| Martin
This has nothing to do with -fno-implicit-templates.
Note that -fno-implicit-templates has been broken since gcc-2.8.x.
I used it with gcc-2.7, but with gcc-2.8 and egcs it is impossible to use.
I am sorry to realize that I am too much de-motivated to write a
bug report due to the fact that my last bug report / request for hints
(http://www.cygnus.com/ml/egcs-patches/1998-Jul/0330.html) is completely
ignored :( by the C++ guru's on this list. So much for "open development".
--
Carlo Wood <carlo@runaway.xs4all.nl>