I\'m getting an undefined references linker error only when linking optimized objects files, not when linking unoptimized object files. I don\'t understan
int VisitedSet<T>::getSize() is a templated function, so its definition should be in a header file like COMPASS.h, not in COMPASS.cpp.
int VisitedSet<T>::getSize()
Here's why: http://www.parashift.com/c++-faq/templates-defn-vs-decl.html