I recently updated to Fedora Core 5 which uses gcc 4.1.0. The included version of TinyXML in 0.9.3 fails to compile. There are also three errors in LocalFileMng.cpp. Here is part of the output:
src/lib/LocalFileMng.cpp:596: error: no matching function for call to ‘TiXmlElement::TiXmlElement(std::string&)’ To get everything fixed all I had to do was update TinyXML to 2.4.3 and add .c_str() to three of the strings in LocalFileMng.cpp. It works fine now. There are two files attached: localfilemng.patch - adds the three .c_str()'s tinyxml.patch.bz2 - updates to 2.4.3 Later.
--- hydrogen-0.9.3.orig/src/lib/LocalFileMng.cpp 2005-10-17 18:32:04.000000000 -0400
+++ hydrogen-0.9.3/src/lib/LocalFileMng.cpp 2006-04-12 18:59:30.882921750 -0400
@@ -593,8 +593,8 @@
void LocalFileMng::writeXmlString( TiXmlNode *parent, string name, string text ) {
- TiXmlElement versionNode( name );
- TiXmlText versionText( text );
+ TiXmlElement versionNode( name.c_str() );
+ TiXmlText versionText( text.c_str() );
versionNode.InsertEndChild( versionText );
parent->InsertEndChild( versionNode );
}
@@ -1155,7 +1155,7 @@
// FIXME: verificare che il file non sia gia' esistente
// FIXME: effettuare copia di backup per il file gia' esistente
- TiXmlDocument doc(filename);
+ TiXmlDocument doc( filename.c_str() );
TiXmlElement songNode("song");
tinyxml.patch.bz2
Description: application/bzip
