Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

TinyXML with Borland free compiler

Jon Thomas
2008-10-03
2013-05-20
  • Jon Thomas
    Jon Thomas
    2008-10-03

    I'm having a hell of a time trying to get TinyXML to work with the Borland free compiler.  I'm a PHP programmer who learned C++ a lot time ago and forgets most of it.  So that's probably the problem. :)  I took an example from the TinyXML site and put the tinyxml directory in my Borland Includes directory, but I'm getting errors.  I would greatly appreciate some help.

    Thanks,
    Jon

    ERRORS:
    Warning W8027 c:\Borland\Bcc55\include\tinyxml/tinystr.h 184: Functions containing for are not expanded inline
    Warning W8027 c:\Borland\Bcc55\include\tinyxml/tinyxml.h 350: Functions containing for are not expanded inline
    Warning W8027 c:\Borland\Bcc55\include\tinyxml/tinyxml.h 1780: Functions containing for are not expanded inline
    Error E2268 xmltest.cpp 8: Call to undefined function 'load_file' in function main()
    Error E2268 xmltest.cpp 20: Call to undefined function 'dump_to_stdout' in function load_file()

    HERE'S THE CODE:
    #include <stdio.h>
    #include <iostream.h>
    #include <tinyxml/tinyxml.h>

    int main()
    {
        load_file();
       
        return 0;
    }

    void load_file( )
    {
        TiXmlDocument doc( "demo.xml" );
        bool loadOkay = doc.LoadFile();

        if ( loadOkay )
        {
            dump_to_stdout( &doc );
        }
        else
        {
            // load failed
            cout << "Didn't work." << endl;
        }
    }