read the information for the creation of the irrlicht device from a xml-file.
you should think its easy...
before writing the proper code you hack a test app to become familiar with irrXML
Code: Select all
#include "irrlicht.h"
using namespace irr;
using namespace io;
#include <cstdio>
#include <cstdlib>
#include <string>
int main(){
IrrXMLReader* xml = createIrrXMLReader("info.xml");
if(!xml){
printf("XMLReader couldnt be initialised!\n");
system("PAUSE");
return 1;
}
std::string nn;
EXML_NODE exn;
while(xml->read()){
exn = xml->getNodeType();
switch(xml->getNodeType()){
case EXN_TEXT:
printf("%s\n", xml->getNodeData());
break;
case EXN_COMMENT:
printf("a comment\n");
break;
case EXN_ELEMENT:
case EXN_ELEMENT_END:
printf("element %s\n", xml->getNodeName());
break;
default:
printf("unknown element\n");
}
}
delete xml;
system("PAUSE");
return 0;
}
your linker says he found an undefined reference to the function irr::io::createIrrXMLReader()
now you dig up the doc, but... you cant find the solution, only a simple:
why?? the code of irrXML should be included in the irrlicht lib, shouldnt it?If you are using the Irrlicht Engine, it is better not to use this function but IFileSystem::createXMLReaderUTF8() instead.
because even niko doesnt know why the f* linker cant find the f* reference??
...
after searching the forum in vain, because nobody ever solved this prob, you quit your efforts and use the irrXML library...
... the app is blown up by 160 kB .... ok i could get over that but still.. its enormously queer this thing...