Arduino IDE/Visual Micro - Undefined reference to constructor I am using Visual Studio Community 2015 with the newest version of the Visual Micro Arduino Plugin, however I also tried compiling my code in the Arduino IDE. 
When compiling my code, there is the following error:

Compiling debug version of 'Autonomous_Car' for 'Arduino/Genuino Uno'
Autonomous_Car.cpp.o:In function `setup
Autonomous_Car.ino:undefined reference to `List&lt;UpdateAble&gt;  List()
Autonomous_Car.ino:undefined reference to `List&lt;UpdateAble&gt;  ~List() 
collect2.exe*:error: ld returned 1 exit status 
Error creating .elf


Some info


Adding #include "List.cpp" fixes the error, however this does not seem like valid C++. 
The files do not lay in any sub-directory
In my Project Explorer both List.h and List.cpp are added to the project.
I also removed both files from the project, deleted them and added them again
I deleted the ´%AppData%\Local\Arduino15´ directory
I am fairly new to C++ and Arduino, there might be something obvious, what I just can't find


Autonomous_Car.ino

#include "List.h"
#include "UpdateAble.h"

void setup()
{
    List&lt;UpdateAble&gt;* myList = new List&lt;UpdateAble&gt;();
    myList-&gt;GetCount();

    delete myList;
}


List.h

#ifndef _LIST_h
#define _LIST_h

#if defined(ARDUINO) &amp;&amp; ARDUINO &gt;= 100
#include "arduino.h"
#else
#include "WProgram.h"
#endif


template &lt;class T&gt;
class List {
public:
    void Add(T &amp;item);
    bool Contains(T &amp;item);
    bool Remove(T &amp;item);
    void Clear();
    int IndexOf(T &amp;item);
    T* GetItem(int index);

    inline int GetCount() { return count; };
    inline int GetCapacity() { return capacity; };

    List();
    ~List();
private:
    void EnsureCapacity(int capacity);

    int count;
    int capacity;
    T** items;
};

#endif


List.cpp

#include "List.h"

// Constructor
template &lt;class T&gt;
List&lt;T&gt;::List() {
    List::capacity = 4;
    List::count = 0;

    List::items = new T*[List::capacity];
}

// Cleanup
template &lt;class T&gt;
List&lt;T&gt;::~List() {
    delete[] List::items;
}

template &lt;class T&gt;
void List&lt;T&gt;::EnsureCapacity(int capacity) {
    if (List::capacity &lt; capacity) {
        // Kapazität verdoppeln
        List::capacity = List::capacity * 2;

        // Speicher für neues array reservieren
        T** newArray = new T*[List::capacity];

        // Array kopieren
        for (unsigned int i = 0; i &lt; List::count; i++) {
            newArray[i] = List::items[i];
        }

        // Speicher von alten array freigeben und neues array zuweisen
        delete[] List::items;
        List::items = newArray;
    }
}

// Adds a new item to the list
template &lt;class T&gt;
void List&lt;T&gt;::Add(T &amp;item) {
    List::EnsureCapacity(count + 1);

    List::items[count] = item;
    List::count++;
}

// Gets whether the list contains an item or not
template &lt;class T&gt;
bool List&lt;T&gt;::Contains(T &amp;item) {
    return List::IndexOf(item) != -1;
}

template &lt;class T&gt;
bool List&lt;T&gt;::Remove(T &amp;item) {
    int index = List::IndexOf(item);

    // If the item does not exist, we cannot remove it
    if (index == -1) return false;

    // Move every item behind our item one further
    for (int i = index + 1; i &lt; List::count; i++) {
        List::items[i - 1] = List::items[i];
    }

    List::count--;
}

// Release the heap 
template &lt;class T&gt;
void List&lt;T&gt;::Clear() {
    for (int i = 0; i &lt; List::count; i++) {
        delete List::items[i];
    }

    delete[] List::items;
}

// Gets an index of an item, -1 if not found
template &lt;class T&gt;
int List&lt;T&gt;::IndexOf(T &amp;item) {
    for (int i = 0; i &lt; List::count; i++) {
        if (List::items[i] == item) {
            return i;
        }
    }

    return -1;
}

template &lt;class T&gt;
T* List&lt;T&gt;::GetItem(int index) {
    if (index &lt; List::count &amp;&amp; index &gt;= 0) {
        return List::items[index];
    }

    return 0;
}


I'd be very glad, if we can find the solution.
You're using a template class. A template class is a special corner case that breaks the "code in .cpp and definitions in .h files" rule.

Because it's a template it can't be pre-compiled - it needs to be specially compiled each time it is used, so that it can get the right values compiled in to the template place-holders, which are provided by the CU that has the template class included with it.

Because of that it is one of the rare cases where the code has to be in the header file.

For a full example you can take a look at my Average library which is a fully templated class.