From: David R. <dre...@mo...> - 2002-06-23 07:09:35
|
I found this out when trying to use Category::getCurrentCategories(), which returns std::set<Category*>*. The set I got had 1 good pointer; the rest were invalid. The problem is detailed by MS in Q168958 "HOWTO: Exporting STL Components Inside & Outside of a Class". Here is the key paragraph:=20 "Some STL classes contain nested classes. These classes can not be exported. For instance, deque contains a nested class deque::iterator. If you export deque, you will get a warning that you must export deque::iterator. If you export deque::iterator, you get a warning that you must export deque. This is caused by a designed limitation that once a template class is instantiated, it can not be re-instantiated and exported. The only STL container that can currently be exported is vector. The other containers (that is, map, set, queue, list, deque) all contain nested classes and cannot be exported." So if you want to use methods such as Category::getCurrentCategories(), do them in a helper class that is linked as part of the DLL. I added what I needed to the SimpleConfigurator (what I needed to do was delete previously defined appenders from all categories before reloading a config file, so it made sense in any case to put it there.) Regards,=20 David Resnick=20 MobileSpear Inc.=20 |