linking templates

Paulo Cortes
Thu Jun 19 23:31:00 GMT 2003


I am using a library that defines templates. The templates
had been explecitly instantiated into the library,
I am just calling them. For example the library
includes a file like:
template class Array<Float>

But if I write a simple program that

Array<Float> a;

I get
undefined reference to `Array<float>::Array()' for example.

The Makefile includes the library, probe of this is that If call
other object that is not a template works well.
Any ideas?

Many Thanks!!


More information about the Gcc-help mailing list