99.9% of the time "unresolved external symbol" means that the linker cannot find the body of a function. This could be because you prototyped the function, but never gave it a body... or (since this is a template related error), you separated your template stuff incorrectly.
A template's functions must be visible in every .cpp file which uses them, unless you specifically instantiate the template class so that it's linked throughout the project.
Long story short, you need to ensure both of the following:
1) Make sure all your functions have bodies
2) For templates, make sure those bodies are in the .h file, and not in a separate .cpp file.
There are ways around #2, but they're all significantly more complicated.
??? The point of a header is usually to create prototypes so that they can be called. Prototypes call the main body of the function. The header doesn't exactly know how to define itself and as a result you need to include the header in the implementation file which contains the body of the functions.
1 2 3 4 5
//bob.h
class bob
{
int ohnoes(bool wtf);
};
1 2
//bob.cpp
int bob::ohnoes) { returntrue; }
The combination above will NOT work unless you include the file with the prototype.
1 2 3 4
//bob.cpp
#include "bob.h"
int bob::ohnoes) { returntrue; }
When dealing with template classes and functions, the easiest solution is to include
the entire body of the class or functions in the header file. If you don't want to do
that, then the next easiest solution is to put the body in another file with an extension
of, say, .inl, and then #include the .inl file in the header file.