I attempted to add xml functionality to an irrlicht project in Irrlicht 0.12.
I got the following on this line: ... IrrXMLReader* xml = createIrrXMLReader(file.c_str()); ...
------------
NEWTON EXAMPLE error LNK2019: unresolved external symbol "class irr::io::IIrrXMLReader<char,class irr::io::IXMLBase> * __cdecl irr::io::createIrrXMLReader(char const *)" (?createIrrXMLReader@io@irr@@YAPAV?$IIrrXMLReader@DVIXMLBase@io@irr@@@12@PBD@Z) referenced in function "public: bool __thiscall Bezier::LoadXML(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?LoadXML@Bezier@@QAE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
------------
when I added the default code for reading an xml file:
// create the reader using one of the factory functions
IrrXMLReader* xml = createIrrXMLReader(file.c_str());
while(xml && xml->read())
{
switch(xml->getNodeType())
{
case EXN_TEXT:
// in this xml file, the only text which // occurs is the messageText
//messageText = xml->getNodeData();
break;
case EXN_ELEMENT:
if (!strcmp("raw", xml->getNodeName()))
{
while(xml && xml->read())
{
if (!strcmp("point", xml->getNodeName()))
{
//raw.insert(
std::string s = xml->getAttributeValue("x");
float fX = (float)atof(s.c_str());
s = xml->getAttributeValue("y");
float fY = (float)atof(s.c_str());
s = xml->getAttributeValue("z");
float fZ = (float)atof(s.c_str());
vector3df v(fX,fY,fZ);
}
}
}
break;
}
}
// delete the xml parser after usage
delete xml;
I noticed that Irrlicht 0.12 uses irrXML 1.1 where the newest irrXML is 1.2.
I don't want to recompile the whole Irrlicht dll, what can I do?
Thanks!