Dear friends,
I'm quite new in template programming but they are giving me a very
hard time. I'm using gcc as a compiler and I'm mainly develop for
linux and windows.
My problem is that I have a template class defined and into a file,
say class.h, and implemented into another (class.cc). If I put the
implementation in the same header file, the compilation is successful
and I can also link an executable file using it.
The problem as you can imagine is when I put the implementation in a
separate file. Of course explicit instantiation is perfectly working,
but this is quite a limiting factor. I tried to see how the automatic
instantiation is working but the explanations I've found on the web
are rather confused and incomplete. I've the feeling that I have to
use the -frepo option but then the linker is failing anyway even if I
have the .rpo files.
Can you help me with this?
thanks in advance...
toto