I have an extension DLL class which contains a static STL map object:
class AFX_EXT_CLASS SomeDLLClass
static map<int,int> sm_SomeMap;
Within an application I try to make a copy of this object:
This causes a crash inside STL. (In fact, it often causes Developer Studio to crash as well.) My theory is that STL's internal static objects (such as _Tree<...>::_Nil) are not working properly across the extension DLL/app boundary, but I am having trouble generating a piece of test code that convinces me that I completely understand the problem.
Has anybody else already dealt with this problem? Are some STL classes off limits within MFC extension DLLs?