Hello,
I am feeling very confused right now. The following code gives me an
error:
X.h:
template <typename T>
ILuint startImage(vect or<vector<T> > imageData);
X.cpp:
template<typena me T>
void X::startImage(v ector<vector<T> > imageData){blah }
test.cpp:
vector<vector<d ouble> > testImage1(10);
X.startImage(te stImage1);
gcc 3.3.2 gives the following error:
/home/dane/myLibraries/image/testDriver.cpp: 25: undefined reference to`unsigned X::startImage<d ouble>(std::vec tor<std::vector <double,
std::allocator< double> >, std::allocator< std::vector<dou ble,std::alloca tor<double> > > >)'
Am I not using templates correctly? It appears to have the correct
function.
Thank you very much for any assistance I might receive!
- dan elliott
I am feeling very confused right now. The following code gives me an
error:
X.h:
template <typename T>
ILuint startImage(vect or<vector<T> > imageData);
X.cpp:
template<typena me T>
void X::startImage(v ector<vector<T> > imageData){blah }
test.cpp:
vector<vector<d ouble> > testImage1(10);
X.startImage(te stImage1);
gcc 3.3.2 gives the following error:
/home/dane/myLibraries/image/testDriver.cpp: 25: undefined reference to`unsigned X::startImage<d ouble>(std::vec tor<std::vector <double,
std::allocator< double> >, std::allocator< std::vector<dou ble,std::alloca tor<double> > > >)'
Am I not using templates correctly? It appears to have the correct
function.
Thank you very much for any assistance I might receive!
- dan elliott
Comment