hi list,
i'm trying to compile the code from:
http://en.wikipedia.org/wiki/Libxml2
(testing to see if i can code something with libxml2)
but i get following output from my compiler
(gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) - [i have ubuntu 8.04 on my
system]:
================================================================================
In file included from xml.c:4:
/usr/include/libxml2/libxml/xmlmemory.h:16:31: error:
libxml/xmlversion.h: No such file
or directory
In file included from xml.c:4:
/usr/include/libxml2/libxml/xmlmemory.h:57: error: expected ?)? before
?*? token
/usr/include/libxml2/libxml/xmlmemory.h:66: error: expected ?)? before
?*? token
/usr/include/libxml2/libxml/xmlmemory.h:77: error: expected ?)? before
?*? token
/usr/include/libxml2/libxml/xmlmemory.h:87: error: expected ?)? before
?*? token
/usr/include/libxml2/libxml/xmlmemory.h:103: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/xmlmemory.h:108: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/xmlmemory.h:113: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/xmlmemory.h:119: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/xmlmemory.h:129: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/xmlmemory.h:135: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/xmlmemory.h:140: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/xmlmemory.h:142: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/xmlmemory.h:144: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/xmlmemory.h:146: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/xmlmemory.h:148: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/xmlmemory.h:150: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/xmlmemory.h:152: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/xmlmemory.h:154: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/xmlmemory.h:156: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?char?
/usr/include/libxml2/libxml/xmlmemory.h:158: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/xmlmemory.h:160: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/xmlmemory.h:162: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/xmlmemory.h:164: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?char?
/usr/include/libxml2/libxml/xmlmemory.h:216:28: error:
libxml/threads.h: No such file or
directory
/usr/include/libxml2/libxml/xmlmemory.h:217:28: error:
libxml/globals.h: No such file or
directory
In file included from xml.c:5:
/usr/include/libxml2/libxml/parser.h:16:25: error: libxml/tree.h: No
such file or
directory
/usr/include/libxml2/libxml/parser.h:17:25: error: libxml/dict.h: No
such file or
directory
/usr/include/libxml2/libxml/parser.h:18:25: error: libxml/hash.h: No
such file or
directory
/usr/include/libxml2/libxml/parser.h:19:26: error: libxml/valid.h: No
such file or
directory
/usr/include/libxml2/libxml/parser.h:20:29: error: libxml/entities.h:
No such file or
directory
/usr/include/libxml2/libxml/parser.h:21:29: error: libxml/xmlerror.h:
No such file or
directory
/usr/include/libxml2/libxml/parser.h:22:30: error: libxml/xmlstring.h:
No such file or
directory
In file included from xml.c:5:
/usr/include/libxml2/libxml/parser.h:52: error: expected ?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:56: error: expected
specifier-qualifier-list before
?xmlParserInputBufferPtr?
/usr/include/libxml2/libxml/parser.h:187: error: expected
specifier-qualifier-list before
?xmlDocPtr?
/usr/include/libxml2/libxml/parser.h:309: error: expected ?:?, ?,?,
?;?, ?}? or
?__attribute__? before ?*? token
/usr/include/libxml2/libxml/parser.h:337: error: expected declaration
specifiers or ?...?
before ?*? token
/usr/include/libxml2/libxml/parser.h:338: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:350: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:363: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:375: error: expected declaration
specifiers or ?...?
before ?*? token
/usr/include/libxml2/libxml/parser.h:376: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:386: error: expected declaration
specifiers or ?...?
before ?*? token
/usr/include/libxml2/libxml/parser.h:387: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:400: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:415: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:431: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:447: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:461: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:474: error: expected declaration
specifiers or ?...?
before ?xmlSAXLocatorPtr?
/usr/include/libxml2/libxml/parser.h:498: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:508: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:521: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:531: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:541: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:553: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:564: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:574: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:585: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:595: error: expected ?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:605: error: expected ?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:617: error: expected ?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:680: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:701: error: expected ?;?, ?,? or
?)? before ?*? token
/usr/include/libxml2/libxml/parser.h:707: error: expected
specifier-qualifier-list before
?internalSubsetSAXFunc?
/usr/include/libxml2/libxml/parser.h:748: error: expected
specifier-qualifier-list before
?internalSubsetSAXFunc?
/usr/include/libxml2/libxml/parser.h:789: error: expected declaration
specifiers or ?...?
before ?*? token
/usr/include/libxml2/libxml/parser.h:791: error: expected declaration
specifiers or ?...?
before ?xmlParserCtxtPtr?
/usr/include/libxml2/libxml/parser.h:791: error: ?xmlParserInputPtr?
declared as function
returning a function
/usr/include/libxml2/libxml/parser.h:797:29: error: libxml/encoding.h:
No such file or
directory
/usr/include/libxml2/libxml/parser.h:798:26: error: libxml/xmlIO.h: No
such file or
directory
/usr/include/libxml2/libxml/parser.h:809: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/parser.h:811: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/parser.h:817: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/parser.h:820: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/parser.h:836: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/parser.h:838: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/parser.h:840: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/parser.h:842: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/parser.h:844: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/parser.h:863: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/parser.h:865: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/parser.h:930: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlParserErrors?
/usr/include/libxml2/libxml/parser.h:954: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/parser.h:963: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlParserCtxtPtr?
/usr/include/libxml2/libxml/parser.h:965: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/parser.h:967: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/parser.h:969: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/parser.h:977: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlParserCtxtPtr?
/usr/include/libxml2/libxml/parser.h:1018: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlParserCtxtPtr?
/usr/include/libxml2/libxml/parser.h:1026: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlParserInputPtr?
/usr/include/libxml2/libxml/parser.h:1034: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?const?
/usr/include/libxml2/libxml/parser.h:1037: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/parser.h:1039: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/parser.h:1041: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?unsigned?
/usr/include/libxml2/libxml/parser.h:1044: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/parser.h:1052: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/parser.h:1054: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlExternalEntityLoader?
/usr/include/libxml2/libxml/parser.h:1056: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlParserInputPtr?
/usr/include/libxml2/libxml/parser.h:1064: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?long?
/usr/include/libxml2/libxml/parser.h:1098: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?void?
/usr/include/libxml2/libxml/parser.h:1100: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/parser.h:1106: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
/usr/include/libxml2/libxml/parser.h:1109: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlDocPtr?
/usr/include/libxml2/libxml/parser.h:1114: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlDocPtr?
/usr/include/libxml2/libxml/parser.h:1118: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlDocPtr?
/usr/include/libxml2/libxml/parser.h:1124: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlDocPtr?
/usr/include/libxml2/libxml/parser.h:1129: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlDocPtr?
/usr/include/libxml2/libxml/parser.h:1136: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlDocPtr?
/usr/include/libxml2/libxml/parser.h:1142: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlDocPtr?
/usr/include/libxml2/libxml/parser.h:1147: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlDocPtr?
/usr/include/libxml2/libxml/parser.h:1154: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlDocPtr?
/usr/include/libxml2/libxml/parser.h:1160: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?xmlDocPtr?
/usr/include/libxml2/libxml/parser.h:1214: error: expected ?=?, ?,?,
?;?, ?asm? or
?__attribute__? before ?int?
xml.c: In function ?main?:
xml.c:16: error: ?xmlChar? undeclared (first use in this function)
xml.c:16: error: (Each undeclared identifier is reported only once
xml.c:16: error: for each function it appears in.)
xml.c:16: error: ?txt? undeclared (first use in this function)
xml.c:17: error: ?xmlDocPtr? undeclared (first use in this function)
xml.c:17: error: expected ?;? before ?doc?
xml.c:18: error: ?xmlNodePtr? undeclared (first use in this function)
xml.c:18: error: expected ?;? before ?cur?
xml.c:25: error: ?doc? undeclared (first use in this function)
xml.c:31: error: ?cur? undeclared (first use in this function)
xml.c:36: error: expected ?)? before ?xmlChar?
xml.c:42: error: ?sub? undeclared (first use in this function)
xml.c:44: error: expected ?)? before ?xmlChar?
xml.c:45: error: expected ?)? before ?xmlChar?
================================================================================
i googled first and checked the mailing list, but i didn't
find any answer to my problem.
i also checked the xml2-config file (attachment)
hope u can give me a hint
greetz
paco
p.s. sorry, i hope i am not sending this a second time, but the first
time i didnt get my message.
#! /bin/sh
prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${exec_prefix}/lib
usage()
{
cat <<EOF
Usage: xml2-config [OPTION]
Known values for OPTION are:
--prefix=DIR change libxml prefix [default $prefix]
--exec-prefix=DIR change libxml exec prefix [default $exec_prefix]
--libs print library linking information
add --static to print static library linking information
--cflags print pre-processor and compiler flags
--modules module support enabled
--help display this help and exit
--version output version information
EOF
exit $1
}
if test $# -eq 0; then
usage 1
fi
cflags=false
libs=false
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case "$1" in
--prefix=*)
prefix=$optarg
includedir=$prefix/include
libdir=$prefix/lib
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
libdir=$exec_prefix/lib
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo 2.6.31
exit 0
;;
--help)
usage 0
;;
--cflags)
echo -I${includedir}/libxml2
;;
--libtool-libs)
if [ -r ${libdir}/libxml2.la ]
then
echo ${libdir}/libxml2.la
fi
;;
--modules)
echo 1
;;
--libs)
if [ "`uname`" = "Linux" ]
then
if [ "-L${libdir}" = "-L/usr/lib" -o "-L${libdir}" = "-L/usr/lib64"
]
then
LIBS="-lxml2"
else
LIBS="-L${libdir} -lxml2"
fi
else
LIBS="-L${libdir} -lxml2 "
fi
if [ "$2" = "--static" ]
then
shift
LIBS="${LIBS} -lz -lpthread -lm "
fi
echo ${LIBS}
;;
*)
usage
exit 1
;;
esac
shift
done
exit 0
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml