Template classes in DLLs
I'm trying to use templated classes in DLLs but I keep having compilation
problems. I'm creating a standard Win32 DLL in VC++ 6.0. I'm trying to use
a templated list container inside a class that I'm exporting from the DLL.
MSVS keeps giving me the following warning in the header file:
c:\dev\gdlib\gdlface.h(53) : warning C4251: 'm_textures' : class 'std::list<class
tex,class std::__default_alloc_template<1,0> >' needs to have dll-interface
to be used by clients of class 'CGDLFace'
The line looks like this:
In my .cpp file, I get another error trying this line:
list<tex>::iterator it = m_textures.begin();
The error is this:
C:\DEV\gdlib\GDLFace.cpp(33) : error C2653: 'list<class tex,class std::__default_alloc_template<1,0>
>' : is not a class or namespace name
Any help debugging this would be greatly appreciated. Please email me any
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL