Menu

i can't even load a tinyXml doc! help please!

unclepauly
2006-11-08
2013-05-20
  • unclepauly

    unclepauly - 2006-11-08

    hi,

    i am new to tiny xml.  i have built from source using VS.NET 2003.  i have built the non-STL version.  then, in my app, i link to tinyxmld.lib and use this code:

        TiXmlDocument doc("C:/scene.xml");
        doc.LoadFile();

    but the app crashes at doc.LoadFile().   it says 'unhandled exception - user breakpoint'.   what the hell have i done wrong?  i have only written 2 lines and im pretty sure these are right!

     
    • Ellers

      Ellers - 2006-11-08

      If you replace the "/" with "\\" and make sure the file is there, does it still crash?

       
      • unclepauly

        unclepauly - 2006-11-08

        hi,

        yes i have already tried that.  the file is defintely there.  any more ideas?

         
    • Ellers

      Ellers - 2006-11-08

      some ideas:

      - what happens when you debug the process? Where does the stack trace say the exception originates?

      - don't link a .lib file; build the .cpp files directly into your app. I always do this with TinyXml because its, well, tiny.

      - post the XML here. Maybe its something to do with that. Post the complete program (if there is anything more to it)

       
      • unclepauly

        unclepauly - 2006-11-08

        my app is quite large, it is an Ogre 3D app.  but,  i think this something to do with my app settings because i just created a new console app and added just the above 2 lines and i can step through this fine.

        i cannot step through the code when it happens, it says 'there is no available source code available for the current loaction'.

        i will try and build directly into my app without a lib file and see what happens now.

        thanks fof your help.

         
    • unclepauly

      unclepauly - 2006-11-08

      i have just been on the ogre forums and it seems there are some known issues in this area.  building everything in release works just fine - its debug that causes the crash.  take a look if you want - http://www.ogre3d.org/phpBB2/viewtopic.php?p=163438&sid=ae70f7de1a5b389048a8ec733d53d30e

      cheers!

       

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.