[xml] relax-ng and windows



Hi!

I am having a simple problem with the relax-ng functions in a windows
environment.

When I try to compile the following simple program found in libxml faq
(see at the end of the message), I got the linker complaining that it
cannot find
a lot of functions: 'xmlNewTextReaderFilename', 'xmlTextReaderRead',
'xmlFreeTextReader' and 'WinMail 16'.

I installed iconv-1.9.2.win32, libxml2-2.6.24.win32, zlib-1.2.3.win32
(binary packages from zlatkovic). For the compiler I am using 'Dev-C++
v4.9.9.2' on Windows XP.

I have no idea what to do; I can make simple programs working using
xmlCtxtReadFile.

Any help would be very appreciated!

Thanks, Patrick

The program:

#include <stdio.h>
#include <stdlib.h>
#include <libxml/xmlreader.h>
#import <libxml/relaxng.h>

void processNode(xmlTextReaderPtr reader) {
    /* handling of a node in the tree */
}

int streamFile(char *filename) {
    xmlTextReaderPtr reader;
    int ret;

    reader = xmlNewTextReaderFilename(filename);
    if (reader != NULL) {
        ret = xmlTextReaderRead(reader);
        while (ret == 1) {
            processNode(reader);
            ret = xmlTextReaderRead(reader);
        }
        xmlFreeTextReader(reader);
        if (ret != 0) {
            printf("%s : failed to parse\n", filename);
        }
    } else {
        printf("Unable to open %s\n", filename);
    }
}






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]