C++ templates troubles

Alexandre Oliva aoliva@redhat.com
Fri Feb 16 09:59:00 GMT 2001


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



More information about the Gcc-bugs mailing list