D
Daniel L Elliott
Hello,
I am feeling very confused right now. The following code gives me an
error:
X.h:
template <typename T>
ILuint startImage(vector<vector<T> > imageData);
X.cpp:
template<typename T>
void X::startImage(vector<vector<T> > imageData){blah}
test.cpp:
vector<vector<double> > testImage1(10);
X.startImage(testImage1);
gcc 3.3.2 gives the following error:
/home/dane/myLibraries/image/testDriver.cpp:25: undefined reference to`unsigned X::startImage<double>(std::vector<std::vector<double,
std::allocator<double> >, std::allocator<std::vector<double,std::allocator<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(vector<vector<T> > imageData);
X.cpp:
template<typename T>
void X::startImage(vector<vector<T> > imageData){blah}
test.cpp:
vector<vector<double> > testImage1(10);
X.startImage(testImage1);
gcc 3.3.2 gives the following error:
/home/dane/myLibraries/image/testDriver.cpp:25: undefined reference to`unsigned X::startImage<double>(std::vector<std::vector<double,
std::allocator<double> >, std::allocator<std::vector<double,std::allocator<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