|
From: Patrick H. <pa...@13...> - 2003-01-25 18:09:57
|
A problem has arisen with CppDOM on Win32, most likely because of the change I made for the import/export stuff for the CppDOM DLL. It has come to my attention that cppdom::Attributes derives from std::map<>. (More specifically, it derives from std::map<std::string, std::string>). If there is code that links against CppDOM that also uses the type std::map<std::string, std::string>, the VC++ 7 linker complains of multiply defined symbols, all of them in the std::map<> class. It is my understanding that deriving from STL types is not recommended, and in my (limited) experience, DLLs and templates as base types do not mix well. So, my proposed change is to fix cppdom::Attributes so that it aggregates std::map<std::string, std::string> instead of extending it. The API for cppdom::Attributes has to be extended a little to have some pass-through methods into the std::map<> interface. I have already made this change and tested it successfully, and I want to know if it is okay to commit it. I'm sure my changes aren't very elegant, but they get the job done. -Patrick -- Patrick L. Hartling | Research Assistant, VRAC pa...@13... | 2274 Howe Hall Room 2624 PGP: http://www.137.org/patrick/pgp.txt | T: +1.515.294.4916 http://www.137.org/patrick/ | http://www.vrac.iastate.edu/ |