[GD-Windows] STL Containers and __declspec(export/import)
Brought to you by:
vexxed72
From: Chris R. <c....@gm...> - 2005-02-06 22:27:17
|
Hi, If you stick a STL container to a class with __declspec(export) vcc will whine about the STL container not being declared with __declspec(export) attribute. What I found after a bit of doc-digging was that MSDN suggests that you explicitly instantiate the STL container with 'extern'. Having done that and still having no success with getting around the annoying warning, I found out that the same MSDN-document had a very small note stating : <quote> "The only STL container that can currently be exported is vector. The other containers (that is map, set,queue, list, deque) all contain nested class and [therefore] cannot be exported." <quote/> The document I'm referring to is entitled "Howto: Exporting STL Components Inside & Outside of a Class" and was last updated on 5-7-2001. Has there been any update on this topic for Studio .Net 2003 (which is what I am using) that I could not find? Am I correct with guessing that using the STL container classes in external header files of a dll is a no-no and should be avoided? Ignoring that warning would be dangerous (for I do not like the concept of fixing problems by disabling the warnings they create). confused and thanking for any insight given regarding this topic, Chris |