Hi,
I'm frustrated!
For two days now I'm trying to compile my own Linked list template to use with any kind of user defined class and I just don't seem to be able to understand why the compiler (dev-c++) keeps saying there's a linker error.
The linker error refers to calls to methods in the class "List" that occur in the main.cpp file, inside the main() method.
Please helppppppppp!!!!!!!!!!!!!!!!!!!!!
(please ignore erros in my actual code, i wasn't able to debug it)

errors:
=====
[Linker error] undefined reference to `List<int>::add(int*)'
[Linker error] undefined reference to `List<int>::clear()'


main.cpp:
=======
Code:
#include "linkedlist.h"
#include <iostream>

using namespace std;


int main()
{
  List<int>* l1 = new List<int>();

  int* p = new int;
  *p = 5;
  l1->add(p);
  
  delete l1;
  
  system("PAUSE");
  return 0;
}
linkedlist.h:
=======
Code:
#define LINKEDLIST_H
#include <stdlib.h>

using namespace std;

template <class Type>
class Node
{
    private:
    Type* data;
    Node* next;
    
    public:
    Node(Type* d){data = d; next = NULL;};
   ~Node(){free(data);};
    
    void setData(Type* d){data = d;};
    void setNext(Node* n){next = n;};
    
    Type* getData(){return data;};
    Node* getNext(){return next;}; 
};

template <class Type>
class List
{
    private:
    Node<Type>* anchor;
    
    public:
    List(){anchor = NULL;};
   ~List(){this->clear();};
    void clear();
    void add(Type* d);
    Type* get(int i);
    void remove(int i);
    Type* disconnect(int i);
    int size();
};

void List<class Type> :: clear()
{
    if(anchor == NULL)
        return;
    
    Node<Type>* p = anchor;
    Node<Type>* q;
    while(p != NULL)
    {
        q = p;
        p = p->getNext();
        delete q;
    }
    anchor = NULL;
}

void List<class Type> :: add(Type* d)
{
    Node<Type>* node = new Node<Type>(d);
    node->setNext(anchor);
    anchor = node;
}

Type* List<class Type> :: get(int i)
{
    if(anchor == NULL || i < 0)
        return NULL;
        
    Node<Type>* p = anchor;
    int m = 0;
    
    while(p != NULL && m < i)
    {
        p = p->getNext();
        m++;
    }
    
    if(m == i)
    {
        return p->getData();
    }
    else
        return NULL;
}

void List<class Type> :: remove(int i)
{
    if(anchor == NULL || i < 0)
        return;
        
    Node<Type>* p;

    if(i == 0)
    {
        p = anchor;
        anchor = anchor->getNext();
        delete p;
        return;
    }
    
    Node<Type>* q = anchor;
    p = anchor->getNext();
    int m = 1;
    
    while(p != NULL && m < i)
    {
        q = p;
        p = p->getNext();
        m++;
    }
    
    if(m == i)
    {
        q->setNext(p->getNext());
        delete p;
    }
    else
        return;
}

Type* List<class Type> :: disconnect(int i)
{
    if(anchor == NULL || i < 0)
        return NULL;
        
    Node<Type>* p;
    Type* result;

    if(i == 0)
    {
        p = anchor;
        anchor = anchor->getNext();
        result =  p->getData();
        p->setData(NULL);
        delete p;
        return result;
    }
    
    Node<Type>* q = anchor;
    p = anchor->getNext();
    int m = 1;
    
    while(p != NULL && m < i)
    {
        q = p;
        p = p->getNext();
        m++;
    }
    
    if(m == i)
    {
        q->setNext(p->getNext());
        result = p->getData();
        p->setData(NULL);
        delete p;
        return result;
    }
    else
        return NULL;
}

int List<class Type> :: size()
{
    int i = 0;
    Node<Type>* p = anchor;
    while(p != NULL)
    {
        p = p->getNext();
        i++;
    }
    return i;
}