Menu

Problems compiling with CodeWarrior on MacOSX

2002-08-26
2002-09-06
  • Rob Laveaux

    Rob Laveaux - 2002-08-26

    Hello all,

    I've downloaded TinyXML and am trying to get it compiled using CodeWarrior on Mac OS X. The compiler is giving me some strange error messages that I can't explain. I've pasted them at the end of this message. It's strange because the same code compiles without a problem on my Windows box using MS VC++.

    Does anyone have a clue on how I can make it compile ? Or could anybody send me a project file for CodeWarrior ?

    Thanks for your help,

    - Rob Laveaux

    Here is a list of the compiler errors I got :
    (BTW. the TINYXML_USE_STL macro is set to off)

    Error   : declaration syntax error
    tinyxml.h line 807 TiXmlDeclaration::TiXmlDeclaration( const char * _version,

    Error   : illegal constructor/destructor declaration
    tinyxml.h line 809   const char * _standalone );

    Error   : declaration syntax error
    tinyxml.h line 807  TiXmlDeclaration::TiXmlDeclaration( const char * _version,

    Error   : illegal constructor/destructor declaration
    tinyxml.h line 809   const char * _standalone );

    Error   : declaration syntax error
    tinyxml.h line 807  TiXmlDeclaration::TiXmlDeclaration( const char * _version,

    Error   : illegal constructor/destructor declaration
    tinyxml.h line 809   const char * _standalone );

    Error   : declaration syntax error
    tinyxml.h line 807  TiXmlDeclaration::TiXmlDeclaration( const char * _version,

    Error   : illegal constructor/destructor declaration
    tinyxml.h line 809   const char * _standalone );

    Error   : illegal function overloading
    tinyxml.cpp line 910   : TiXmlNode( TiXmlNode::DECLARATION )

    Error   : illegal name overloading
    tinyxml.cpp line 911   {

    Error   : declaration syntax error
    tinyxml.cpp line 912   version = _version;

    Error   : declaration syntax error
    tinyxml.cpp line 913   encoding = _encoding;

    Error   : declaration syntax error
    tinyxml.cpp line 914   standalone =
    _standalone;

    Error   : declaration syntax error
    tinyxml.cpp line 915   }

    Error   : undefined identifier 'clone'
    tinyxml.cpp line 958   TiXmlDeclaration* clone = new TiXmlDeclaration();

    Error   : undefined identifier 'clone'
    tinyxml.cpp line 960   if ( !clone )

    Error   : undefined identifier 'clone'
    tinyxml.cpp line 963   CopyToClone( clone );

    Error   : undefined identifier 'clone'
    tinyxml.cpp line 964   clone->version = version;

    Error   : undefined identifier 'clone'
    tinyxml.cpp line 965   clone->encoding = encoding;

    Error   : undefined identifier 'clone'
    tinyxml.cpp line 966   clone->standalone standalone;

    Error   : undefined identifier 'clone'
    tinyxml.cpp line 967   return clone;

    Error   : declaration syntax error
    tinyxml.h line 807  TiXmlDeclaration::TiXmlDeclaration( const char * _version,

    Error   : illegal constructor/destructor declaration
    tinyxml.h line 809   const char * _standalone );

     
    • Rob Laveaux

      Rob Laveaux - 2002-09-06

      I found the problem.

      I made the following change in "tinyxml.h" :

      Replace
      TiXmlDeclaration::TiXmlDeclaration(const char* _version.....

      with
      TiXmlDeclaration(const char* _version.....

      This once proves again that CodeWarrior is really picky about correct syntax, which of course is a good thing.

      - Rob

       

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.