[ create a new paste ] login | about

Link: http://codepad.org/I8cZrffL    [ raw code | output | fork ]

broli - C, pasted on Nov 7:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <libxml/xmlreader.h>
//#include "processFile.h"

int processFileFake(reader)
{
	printf("im a fake function");
	return 0;
}

int main(int argc, char **argv)
{
    xmlTextReaderPtr reader=NULL; //pointer to the reader
    int ret; //return code

    reader = xmlReaderForFile("test.xml",NULL,0); //we open the file

	if (reader != NULL) //aka we where able to open it
	{
		ret = processFileFake(reader);
		if (ret == -1)
			return EXIT_FAILURE;
	}
    	else
        {
        	printf("Unable to open test.xml\n");
    	}

    printf("we are done\n");

    xmlFreeTextReader(reader);
    
    xmlCleanupParser();


    return 0;
}


Output:
1
2
3
4
5
6
7
Line 29: error: libxml/xmlreader.h: No such file or directory
In function 'main':
Line 15: error: 'xmlTextReaderPtr' undeclared (first use in this function)
Line 15: error: (Each undeclared identifier is reported only once
Line 15: error: for each function it appears in.)
Line 15: error: expected ';' before 'reader'
Line 18: error: 'reader' undeclared (first use in this function)


Create a new paste based on this one


Comments: