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]

C++ templates troubles


I am using  gcc v.2.95.2.
I have the following problem when using C++ templates:
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?


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