dll-exporting a class defined with a template
Posted on 1998-09-13
The following code attempts to dll-export the class cBig; the MicroSoft Visual C++ 5.0 compiler generates the following warning:
warning C4251: 'mRange' : class 'TRange<long>' needs to have dll-interface to be used by clients of class 'CBig'
the code :
// Start of code
#define DllExport __declspec( dllexport )
template<class T> class TRange
class DllExport cBig
typedef TRange<long> CRange;
// End of code
What should I do in order to resolve this warning? I've tried to insert an additional 'DllExport' almost everywhere in the code.