"Why in the last version there are still no namespace solution for TinyXML?"
Everyone already using tinyxml wouldn't really be helped. They don't want to go change there existing code, so with namespaces:
class TiXmlDocument
would still be:
class TiXmlDocument
in a namespace. Which is somewhat helpful, but not high-priority.
Your linking problem has nothing to do with namespaces. It looks like one library is being built with static c libraries and the other is being built with dynamic libraries.
lee
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Why in the last version there are still no namespace solution for TinyXML?
After building my dll with TinyXML no stl version, I've got a conflict with LIBC.
And then, below is what I got after building my plug-in dll with TinyXML STL:
msvcprtd.lib(MSVCP70D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in tinyXML_STL.lib(tinyxml.obj)
msvcprtd.lib(MSVCP70D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) already defined in tinyXML_STL.lib(tinyxml.obj)
msvcprtd.lib(MSVCP70D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in tinyXML_STL.lib(tinyxml.obj)
msvcprtd.lib(MSVCP70D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in tinyXML_STL.lib(tinyxml.obj)
msvcprtd.lib(MSVCP70D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in tinyXML_STL.lib(tinyxml.obj)
msvcprtd.lib(MSVCP70D.dll) : error LNK2005: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::size(void)const " (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) already defined in tinyXML_STL.lib(tinyxml.obj)
libcp.lib(ios.obj) : error LNK2005: "public: void __thiscall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@QAEXXZ) already defined in msvcprtd.lib(MSVCP70D.dll)
libcp.lib(ios.obj) : error LNK2005: "public: virtual __thiscall std::ios_base::~ios_base(void)" (??1ios_base@std@@UAE@XZ) already defined in msvcprtd.lib(MSVCP70D.dll)
libcp.lib(ios.obj) : error LNK2005: "public: void __thiscall std::ios_base::clear(int,bool)" (?clear@ios_base@std@@QAEXH_N@Z) already defined in msvcprtd.lib(MSVCP70D.dll)
libcp.lib(ios.obj) : error LNK2005: "protected: void __thiscall std::ios_base::_Init(void)" (?_Init@ios_base@std@@IAEXXZ) already defined in msvcprtd.lib(MSVCP70D.dll)
libcp.lib(locale0.obj) : error LNK2005: "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z) already defined in msvcprtd.lib(MSVCP70D.dll)
libcp.lib(locale0.obj) : error LNK2005: "public: void __thiscall std::locale::facet::_Register(void)" (?_Register@facet@locale@std@@QAEXXZ) already defined in msvcprtd.lib(MSVCP70D.dll)
libcp.lib(locale0.obj) : error LNK2005: "public: __thiscall std::_Locinfo::~_Locinfo(void)" (??1_Locinfo@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP70D.dll)
libcp.lib(locale0.obj) : error LNK2005: "public: __thiscall std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo@std@@QAE@PBD@Z) already defined in msvcprtd.lib(MSVCP70D.dll)
libcp.lib(locale0.obj) : error LNK2005: "public: __thiscall std::locale::locale(void)" (??0locale@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP70D.dll)
msvcprtd.lib(MSVCP70D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in tinyXML_STL.lib(tinyxml.obj); second definition ignored
msvcprtd.lib(MSVCP70D.dll) : warning LNK4006: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@ABV01@@Z) already defined in tinyXML_STL.lib(tinyxml.obj); second definition ignored
msvcprtd.lib(MSVCP70D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in tinyXML_STL.lib(tinyxml.obj); second definition ignored
msvcprtd.lib(MSVCP70D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)" (??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in tinyXML_STL.lib(tinyxml.obj); second definition ignored
msvcprtd.lib(MSVCP70D.dll) : warning LNK4006: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in tinyXML_STL.lib(tinyxml.obj); second definition ignored
msvcprtd.lib(MSVCP70D.dll) : warning LNK4006: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::size(void)const " (?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) already defined in tinyXML_STL.lib(tinyxml.obj); second definition ignored
libcp.lib(ios.obj) : warning LNK4006: "public: void __thiscall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@QAEXXZ) already defined in msvcprtd.lib(MSVCP70D.dll); second definition ignored
libcp.lib(ios.obj) : warning LNK4006: "public: virtual __thiscall std::ios_base::~ios_base(void)" (??1ios_base@std@@UAE@XZ) already defined in msvcprtd.lib(MSVCP70D.dll); second definition ignored
libcp.lib(ios.obj) : warning LNK4006: "public: void __thiscall std::ios_base::clear(int,bool)" (?clear@ios_base@std@@QAEXH_N@Z) already defined in msvcprtd.lib(MSVCP70D.dll); second definition ignored
libcp.lib(ios.obj) : warning LNK4006: "protected: void __thiscall std::ios_base::_Init(void)" (?_Init@ios_base@std@@IAEXXZ) already defined in msvcprtd.lib(MSVCP70D.dll); second definition ignored
libcp.lib(locale0.obj) : warning LNK4006: "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z) already defined in msvcprtd.lib(MSVCP70D.dll); second definition ignored
libcp.lib(locale0.obj) : warning LNK4006: "public: void __thiscall std::locale::facet::_Register(void)" (?_Register@facet@locale@std@@QAEXXZ) already defined in msvcprtd.lib(MSVCP70D.dll); second definition ignored
libcp.lib(locale0.obj) : warning LNK4006: "public: __thiscall std::_Locinfo::~_Locinfo(void)" (??1_Locinfo@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP70D.dll); second definition ignored
libcp.lib(locale0.obj) : warning LNK4006: "public: __thiscall std::_Locinfo::_Locinfo(char const *)" (??0_Locinfo@std@@QAE@PBD@Z) already defined in msvcprtd.lib(MSVCP70D.dll); second definition ignored
libcp.lib(locale0.obj) : warning LNK4006: "public: __thiscall std::locale::locale(void)" (??0locale@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP70D.dll); second definition ignored
Creating library o:\3dsmax6\stdplugs\myexp.lib and object o:\3dsmax6\stdplugs\myexp.exp
MyEXP.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall TiXmlDocument::StreamOut(class TiXmlOutStream *)const " (?StreamOut@TiXmlDocument@@MBEXPAVTiXmlOutStream@@@Z)
libcp.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol _errno
libcp.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol _errno
libcp.lib(xwcscoll.obj) : error LNK2001: unresolved external symbol _errno
libcp.lib(locale.obj) : error LNK2001: unresolved external symbol _errno
libcp.lib(xwctomb.obj) : error LNK2001: unresolved external symbol _errno
libcp.lib(wlocale.obj) : error LNK2001: unresolved external symbol _errno
libcp.lib(xlocale.obj) : error LNK2001: unresolved external symbol _errno
o:\3dsmax6\stdplugs\myexp.dle : fatal error LNK1120: 2 unresolved externals
sorry for that big mess...
"Why in the last version there are still no namespace solution for TinyXML?"
Everyone already using tinyxml wouldn't really be helped. They don't want to go change there existing code, so with namespaces:
class TiXmlDocument
would still be:
class TiXmlDocument
in a namespace. Which is somewhat helpful, but not high-priority.
Your linking problem has nothing to do with namespaces. It looks like one library is being built with static c libraries and the other is being built with dynamic libraries.
lee