Re: [xml] libxml2 linker errors in Visual Studio 2010

Thanks Bjoern, but I still can't figure out how to link it properly.

I'm just trying to compile the example program:

#include <libxml/xmlreader.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) {
            ret = xmlTextReaderRead(reader);
        if (ret != 0) {
            printf("%s : failed to parse\n", filename);
    } else {
        printf("Unable to open %s\n", filename);

My linker additional dependencies are:

Please tell me how to get this working.

Thanks for all suggestions,

Alec Taylor

On Thu, Oct 13, 2011 at 11:13 AM, Bjoern Hoehrmann <derhoermi gmx net> wrote:
* Alec Taylor wrote:
1>LINK : fatal error LNK1561: entry point must be defined


 The linker did not find an entry point. You may have intended to link
 as a DLL, in which case you should link with the /DLL option. You may
 have also forgotten to specify the name of the entry point; link with
 the /ENTRY option.

 Otherwise, you should include a main, wmain, WinMain, or wMain
 function in your code.

That seems pretty clear.
Björn Höhrmann · mailto:bjoern hoehrmann de ·
Am Badedeich 7 · Telefon: +49(0)160/4415681 ·
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 ·

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