This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: C++ templates troubles
- To: "Vasiliy A. Chernoivan" <black at phd dot uni dot udm dot ru>
- Subject: Re: C++ templates troubles
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 16 Feb 2001 15:59:06 -0200
- Cc: <gcc-bugs at gcc dot gnu dot org>
- Organization: GCC Team, Red Hat
- References: <00fb01c097eb$22120950$50e0a8c0@ctp800>
On Feb 16, 2001, "Vasiliy A. Chernoivan" <black@phd.uni.udm.ru> wrote:
> if I declare all the member functions as inline (within class declaration)
> it works just well. But when I write declarations and definitions in
> separate files, it causing errors like this:
> /tmp/ccHlaMEs.o(.text+0x11): undefined reference to
> `classname<int>::classname()'
> How can I avoid this?
Make the definitions visible at the point of [implicit]
instantiation.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me