[xslt] newbie trouble building the tutorial



Hi all,

I can't seem to get the tutorial on the main site (http://xmlsoft.org/XSLT/tutorial/libxslttutorial.html) to compile.  Errors at the end of this message.

I'm using Ubuntu Hoary:

libxml 2-2.6.22
libxslt 1.1.15

Both of these build and install without error - the libraries install in /usr/local/lib and the headers in /usr/local/include. 

I moved my old libxslt libraries out of the way and ldconfig'd.  After this, I have verified that the libraries are new and available for linking like so:

root tiny:/usr/src/libxslt-1.1.15/examples # ldconfig -p | grep libxslt
        libxslt.so.1 (libc6) => /usr/local/lib/libxslt.so.1
        libxslt.so (libc6) => /usr/local/lib/libxslt.so

However, when compiling the tutorial, I get errors suggesting the library functions are not available.  I also tried compiling the example in the /example directory (xsltICUSort.c), but that failed as below as well.  I'm not sure xsltICUSort.c is actually an example of library usage anyway, it looks more like a library extension of some kind.

I figure either I am doing something stupid again or I'm not looking in the right place for examples/tutorials.  Help? 

Output of compilation:

root tiny:/usr/src/libxslt-1.1.15/examples # gcc 2tut.c
In file included from 2tut.c:28:
/usr/include/libxml/DOCBparser.h:22:2: warning: #warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
/tmp/ccWZOMrI.o(.text+0x1bb): In function `main':
: undefined reference to `xmlSubstituteEntitiesDefault'
/tmp/ccWZOMrI.o(.text+0x1c3): In function `main':
: undefined reference to `__xmlLoadExtDtdDefaultValue'
/tmp/ccWZOMrI.o(.text+0x1e1): In function `main':
: undefined reference to `xsltParseStylesheetFile'
/tmp/ccWZOMrI.o(.text+0x204): In function `main':
: undefined reference to `xmlParseFile'
/tmp/ccWZOMrI.o(.text+0x21c): In function `main':
: undefined reference to `xsltApplyStylesheet'
/tmp/ccWZOMrI.o(.text+0x236): In function `main':
: undefined reference to `xsltSaveResultToFile'
/tmp/ccWZOMrI.o(.text+0x244): In function `main':
: undefined reference to `xsltFreeStylesheet'
/tmp/ccWZOMrI.o(.text+0x252): In function `main':
: undefined reference to `xmlFreeDoc'
/tmp/ccWZOMrI.o(.text+0x260): In function `main':
: undefined reference to `xmlFreeDoc'
/tmp/ccWZOMrI.o(.text+0x268): In function `main':
: undefined reference to `xsltCleanupGlobals'
/tmp/ccWZOMrI.o(.text+0x26d): In function `main':
: undefined reference to `xmlCleanupParser'
collect2: ld returned 1 exit status
root tiny:/usr/src/libxslt-1.1.15/examples # ls
2tut.c  tut.c  xsltICUSort.c  xsltICUSort.c~
root tiny:/usr/src/libxslt-1.1.15/examples # gcc xsltICUSort.c
xsltICUSort.c:13:29: /libxml/libxslt.h: No such file or directory
xsltICUSort.c:17:18: xslt.h: No such file or directory
xsltICUSort.c:18:27: xsltInternals.h: No such file or directory
xsltICUSort.c:19:23: xsltutils.h: No such file or directory
xsltICUSort.c:20:23: transform.h: No such file or directory
xsltICUSort.c:21:23: templates.h: No such file or directory
xsltICUSort.c:23:26: unicode/ucnv.h: No such file or directory
xsltICUSort.c:24:29: unicode/ustring.h: No such file or directory
xsltICUSort.c:25:28: unicode/utypes.h: No such file or directory
xsltICUSort.c:26:26: unicode/uloc.h: No such file or directory
xsltICUSort.c:27:26: unicode/ucol.h: No such file or directory
xsltICUSort.c:40: error: parse error before "ctxt"
xsltICUSort.c: In function `xsltICUSortFunction':
xsltICUSort.c:42: error: `xmlXPathObjectPtr' undeclared (first use in this function)
xsltICUSort.c:42: error: (Each undeclared identifier is reported only once
xsltICUSort.c:42: error: for each function it appears in.)
xsltICUSort.c:42: error: `resultsTab' undeclared (first use in this function)
xsltICUSort.c:42: error: `XSLT_MAX_SORT' undeclared (first use in this function)
xsltICUSort.c:43: error: `results' undeclared (first use in this function)
xsltICUSort.c:43: error: `res' undeclared (first use in this function)
xsltICUSort.c:44: error: `xmlNodeSetPtr' undeclared (first use in this function)
xsltICUSort.c:44: error: parse error before "list"
xsltICUSort.c:51: error: parse error before "tmp"
xsltICUSort.c:52: error: `xsltStylePreCompPtr' undeclared (first use in this function)
xsltICUSort.c:56: error: `UCollator' undeclared (first use in this function)
xsltICUSort.c:56: error: `coll' undeclared (first use in this function)
xsltICUSort.c:57: error: `UConverter' undeclared (first use in this function)
xsltICUSort.c:57: error: `conv' undeclared (first use in this function)
xsltICUSort.c:58: error: `UErrorCode' undeclared (first use in this function)
xsltICUSort.c:58: error: parse error before "status"
xsltICUSort.c:59: error: `UChar' undeclared (first use in this function)
xsltICUSort.c:59: error: `target' undeclared (first use in this function)
xsltICUSort.c:59: error: `target2' undeclared (first use in this function)
xsltICUSort.c:63: error: `ctxt' undeclared (first use in this function)
xsltICUSort.c:63: error: `sorts' undeclared (first use in this function)
xsltICUSort.c:63: error: `nbsorts' undeclared (first use in this function)
xsltICUSort.c:68: error: `comp' undeclared (first use in this function)
xsltICUSort.c:72: error: `list' undeclared (first use in this function)
xsltICUSort.c:83: error: `XSLT_NAMESPACE' undeclared (first use in this function)
xsltICUSort.c:135: error: `status' undeclared (first use in this function)
xsltICUSort.c:135: error: `U_ZERO_ERROR' undeclared (first use in this function)
xsltICUSort.c:150: error: `UCOL_CASE_FIRST' undeclared (first use in this function)
xsltICUSort.c:150: error: `UCOL_LOWER_FIRST' undeclared (first use in this function)
xsltICUSort.c:152: error: `UCOL_UPPER_FIRST' undeclared (first use in this function)
xsltICUSort.c:255: error: `tmp' undeclared (first use in this function)
root tiny:/usr/src/libxslt-1.1.15/examples #







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