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:
And:Code:template<typename T> class AFX_EXT_CLASS CTmplString
EXPORT is defined as:Code:EXPORT template CTmplString<char>; EXPORT template CTmplString<wchar_t>;
Yet, I get a heap of linker errors for CTmplString<wchar_t>.Code:#ifdef _AFXEXT #define EXPORT __declspec(dllexport) #else #define EXPORT __declspec(dllimport) #endif
Anyone got a pointer? It's supposed to work to export explicit instantiations.