I know it's been discussed somewhere before, but I can't find it.
I don't quite remember how to export templates from a dll.
My current code does:
Code:
template<typename T> class AFX_EXT_CLASS CTmplString
And:
Code:
EXPORT template CTmplString<char>;
EXPORT template CTmplString<wchar_t>;
EXPORT is defined as:
Code:
#ifdef _AFXEXT
#define EXPORT __declspec(dllexport)
#else
#define EXPORT __declspec(dllimport)
#endif
Yet, I get a heap of linker errors for CTmplString<wchar_t>.
Anyone got a pointer? It's supposed to work to export explicit instantiations.