-
Template classes in DLLs
<p>
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:
</p><p>
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'
</p><p>
The line looks like this:
</p><p>
list<tex> m_textures;
</p><p>
In my .cpp file, I get another error trying this line:
</p><p>
list<tex>::iterator it = m_textures.begin();
</p><p>
The error is this:
</p><p>
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
</p><p>
Any help debugging this would be greatly appreciated. Please email me any
solution.</p>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
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
|
Bookmarks