Menu

tinyxml with STL / cv6 and MFC

herve
2004-08-27
2004-09-15
  • herve

    herve - 2004-08-27

    i want to use tinyxml(for a use with STL) with cv6 in a program who use the MFC.

    When i build the project i have linking errors like:
    Linking...
    MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _sprintf already defined in libcmtd.lib(sprintf.obj)
    MSVCRTD.lib(MSVCRTD.dll) : error LNK2005: _atoi already defined in libcmtd.lib(atox.obj)
    ....
    afac65Dlg.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall TiXmlDocument::StreamOut(class TiXmlOutStream *)const " (?StreamOut@TiXmlDocument@@MBEXPAVTiXmlOutStream@@@Z)
    Debug/afac65.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    is there somebody who have this sort of problem?
    if someone have an exemple of program who use tinyxml with STL on  cv6 and MFC . it could be helpfull.

    thanks,

     
    • Ellers

      Ellers - 2004-08-27

      The first problem is in your project settings. Select the project settings (alt+f7 from memory). Go to C/C++, category 'Code Generation', option 'Use run-time library' and make sure that the tinyxml library and your mfc program are the same.

      the second part .. the unresolved external symbol. Hmm.. try a full clean-then-rebuild cycle and see if it helps.  (Lame suggestion I know but sometimes it helps)

      The fact that you're using STL and MFC is not the problem.. these are just compiler/project options.

      HTH :)
      Ellers

       
    • herve

      herve - 2004-09-15

      it's all right,  thanks

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.