This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ templates troubles


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]