Mail Archives: djgpp/1999/09/22/19:39:05
Hi,
I think that I have a problem related to template instantiation,
the following code :
// FILE smat.h
template <class T> class smat
{
...
}
// FILE rwfile.h and rwfile.cpp
#include "smat.h"
class rwfile
{
...
template <class T> int read( smat<T> data);
...
}
// FILE main.cpp
#include "smat.h"
#include "rwfile.h"
int main()
{
smat<int> dint;
read(dint);
}
compiles without problems, but the linker reports (I am using a RHIDE
1.4.7 project):
Error undefined reference to int rwfile::read( smat<int> )
any ideas?
Thanks
--
Leonardo A. Saravia - Programa de Ecologia Matematica
Universidad Nacional De Lujan - C.C. 221 - (6700) - Lujan - Argentina
Tel: 54 2323 423171/421030 Fax: 54 2323 425975 e-mail:
lsaravia AT mail DOT retina DOT ar
- Raw text -