I have try each and everyone of the "CFLAGS" in my "makefile" and i am sure that i have the "libxml2.a" , "libxml2.dll.a" , "libxml2.la" and "xmlmemory.h" in the all the directory.
Code:
CC = gcc
CFLAGS = -Wall -g -L/cygwin/usr/include/libxml2/libxml
LIBS = -lxml2
# CFLAGS = -Wall -g -I/cygwin/lib/libxml
# CFLAGS = -Wall -g -L/cygwin/home/Diana/ass1/ass/bin/labweek11/libxml
# CFLAGS = -Wall -g -I/usr/include/libxml2
# CFLAGS = -Wall -g -I/usr/include/libxml
# CFLAGS = -Wall -g -I/cygwin/usr/include/libxml2/libxml -l/cygwin/usr/include/libxml2/libxml
# CFLAGS = -Wall -g -L/cygwin/usr/include/libxml2/libxml
# LIBS = -lxml
outline: outline.o
$(CC) $(LDFLAGS) -o $@ outline.o $(LIBS)
But i think it is wired that when i compile my "makefile", it say can't find the "/libxml/xmlmemory.h" and the "/libxml/parser.h" file.
Code:
$ make
gcc -Wall -g -L/cygwin/usr/include/libxml2/libxml -c -o outline.o outline.c
outline.c:12:30: libxml/xmlmemory.h: No such file or directory
outline.c:13:27: libxml/parser.h: No such file or directory
outline.c:50: error: parse error before "xmlNodePtr"
outline.c:50: warning: no semicolon at end of struct or union
outline.c:52: error: parse error before '}' token
outline.c:52: warning: type defaults to `int' in declaration of `Component'
outline.c:52: warning: data definition has no type or storage class
outline.c:54: error: parse error before "nest"
outline.c:54: warning: type defaults to `int' in declaration of `nest'
outline.c:54: warning: data definition has no type or storage class
outline.c:58: error: parse error before "xmlDocPtr"
outline.c: In function `main':
outline.c:64: error: `xmlDocPtr' undeclared (first use in this function)
outline.c:64: error: (Each undeclared identifier is reported only once
outline.c:64: error: for each function it appears in.)
outline.c:64: error: parse error before "doc"
outline.c:65: error: `xmlNodePtr' undeclared (first use in this function)
outline.c:89: error: `doc' undeclared (first use in this function)
outline.c:89: warning: implicit declaration of function `xmlNewDoc'
outline.c:90: error: `np' undeclared (first use in this function)
outline.c:90: warning: implicit declaration of function `xmlNewNode'
outline.c:91: warning: implicit declaration of function `xmlDocSetRootElement'
outline.c:93: error: request for member `element' in something not a structure or union
outline.c:94: error: request for member `num_children' in something not a structure or
union
outline.c:97: warning: implicit declaration of function `xmlSaveFormatFile'
outline.c: At top level:
outline.c:102: error: parse error before "xmlDocPtr"
outline.c: In function `process':
outline.c:107: error: `xmlNodePtr' undeclared (first use in this function)
outline.c:107: error: parse error before "np"
outline.c:115: error: `fin' undeclared (first use in this function)
outline.c:118: warning: implicit declaration of function `xmlNodeSetContent'
outline.c:118: error: request for member `element' in something not a structure or unio
n
outline.c:150: error: `np' undeclared (first use in this function)
outline.c:150: warning: implicit declaration of function `xmlNewTextChild'
outline.c:150: error: request for member `element' in something not a structure or unio
n
outline.c:151: error: request for member `num_children' in something not a structure or
union
outline.c:152: error: `temp' undeclared (first use in this function)
outline.c:169: error: request for member `element' in something not a structure or unio
n
outline.c:173: error: request for member `element' in something not a structure or unio
n
outline.c:175: error: request for member `num_children' in something not a structure or
union
outline.c:194: error: request for member `element' in something not a structure or unio
n
outline.c:195: error: request for member `num_children' in something not a structure or
union
outline.c: In function `getlabel':
outline.c:217: error: request for member `num_children' in something not a structure or
union
outline.c:219: error: request for member `num_children' in something not a structure or
union
make: *** [outline.o] Error 1