#134878 - jimmy - Tue Jul 17, 2007 10:26 pm
I'm using a Makefile that comes from one of the devkitARM (r20) examples. When trying to use class templates, I get a link error (undefined reference). Having looked through the forum for an hour or so now, I havent managed to find anything useful to me. Is it a problem with the Makefile im using perhaps (as I mentioned, its taken from one of the devkitARM examples)? If so, can anyone please post the required modifications to the example makefile in order to make it work with c++ templates?
Here is the tiny test class that's causing the error:
test.h:
template <typename T>
class Test
{
public:
void DoSomething( T blah );
};
test.cpp:
template <typename T> void Test<T>::DoSomething( T blah )
{
}
Here is the tiny test class that's causing the error:
test.h:
template <typename T>
class Test
{
public:
void DoSomething( T blah );
};
test.cpp:
template <typename T> void Test<T>::DoSomething( T blah )
{
}