I\'m trying to link to a shared library with a template class, but it is giving me \"undefined symbols\" errors. I\'ve condensed the problem to about 20 lines of code.
You need to include the implementation of the template classes in the header files as well. This is a constraint of templates in C++. So either include shared.cpp from main (#include ) or just move the code from shared.cpp in shared.h