linking templates

Paulo Cortes cortes@uiuc.edu
Thu Jun 19 23:31:00 GMT 2003


Hi

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:

Array_1000.cc
#include<aips/Array/Array.cc>
template class Array<Float>

But if I write a simple program that
do:

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!!


Paulo




More information about the Gcc-help mailing list