STL Containers and __declspec(export/import)

Chris Raine <[email protected]> Sun, 06 Feb 2005 23:26:08 +0100
Newsgroups gmane.games.devel.windows
Message-ID <[email protected]>
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 





-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=555