Iceman2005
Programmer
okay i wrote a simple XML program.... everything COMPILES and its fine. when i ran it... it CRASHES....
#include <stdlib.h>
#include <string.h>
#include <libxml/tree.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
int main(int argc, char **argv)
{
xmlDocPtr doc = NULL;
/* load doc file */
doc = xmlParseFile(argv[1]);
if (doc)
{
/* print xml document to stdout */
xmlDocDump(stdout, doc); // CRASHES HERE
}
return(0);
}
// the xml file as input....
<xml>hello</xml>
// the command to run it...
C:\progname xmlfile.xml
why in the world did it crash on xmlDocDump, i remember my program needs to add libxml2.dll and i compiled also with libxml2.lib
thanks.
755
#include <stdlib.h>
#include <string.h>
#include <libxml/tree.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
int main(int argc, char **argv)
{
xmlDocPtr doc = NULL;
/* load doc file */
doc = xmlParseFile(argv[1]);
if (doc)
{
/* print xml document to stdout */
xmlDocDump(stdout, doc); // CRASHES HERE
}
return(0);
}
// the xml file as input....
<xml>hello</xml>
// the command to run it...
C:\progname xmlfile.xml
why in the world did it crash on xmlDocDump, i remember my program needs to add libxml2.dll and i compiled also with libxml2.lib
thanks.
755