Original Post
Hi I'm getting linker problems when I'm trying to implement my second template class in my project using the linux GCC linker and eclipse with CDT. I'm just wondering whether anyone's ever had similar problems. Here's the code: DataSet.h ::CDataSet[in-charge]()' Any ideas what it could be? Thanks
#ifndef _DATASET_H
#define _DATASET_H
template <class T> class CDataSet
{
public:
CDataSet();
};
#endif //_DATASET_H_
DataSet.cpp
#include "DataSet.h"
template <class T>
CDataSet<T>::CDataSet()
{
}
Main.cpp
#include "DataSet.h"
class CTest
{
};
int main( int argc, char* argv )
{
CDataSet<CTest> dataSet;
}
The error I get is: undefined reference to `CDataSet