[Anjuta-list] Anjuta include problems.



Hello,
I'm new here. I usually do not post to mail lists until I search all
information regarding the problem over the net. 

Software information:
Debian GNU/Linux (Sid) and Anjuta 1.2.3.

Here is my problem:
I created C/GTK+ project using Anjuta project wizard. All works well. I
included needed libraries and header files using "Project->Configure
Project" dialog. 

Under "Project->Configure Project->Configuration->Libraries tab":
PKG_CHECK_MODULES(xml, [libxml-2.0 >= 2.4])

AC_SUBST(xml_CFLAGS)
AC_SUBST(xml_LIBS)

Under "Project->Configure Project->Configuration->Headers":
include/gui.h
include/callbacks.h
include/data_struct.h
include/io.h

I tell the compiler to use:
AC_SUBST(xml_CFLAGS)
AC_SUBST(xml_LIBS)

I auto generated my project again because of changes to take effect.
Auto generation was done successfully.

But when I press "F11" (Build) i get the following errors:
----------------------------------------------------------------------------------------------------------------------------
Building source directory of the Project: vMovieDB ...
make 
gcc -DHAVE_CONFIG_H -I. -I. -I.. -DXTHREADS -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0
-I/usr/include/pango-1.0 -I/usr/include/freetype2
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/libxml2   	 -Wall 	 -g -g -O2 -c io.c
io.c:27: error: syntax error before "GtkListStore"
io.c: In function `populate_tree':
io.c:29: error: `xmlDocPtr' undeclared (first use in this function)
io.c:29: error: (Each undeclared identifier is reported only once
io.c:29: error: for each function it appears in.)
io.c:29: error: syntax error before "doc"
io.c:30: error: `xmlNodePtr' undeclared (first use in this function)
io.c:32: error: `doc' undeclared (first use in this function)
io.c:32: warning: implicit declaration of function `xmlParseFile'
io.c:32: error: `docname' undeclared (first use in this function)
io.c:40: error: `cur' undeclared (first use in this function)
io.c:40: warning: implicit declaration of function
`xmlDocGetRootElement'
io.c:45: warning: implicit declaration of function `xmlFreeDoc'
io.c:49: warning: implicit declaration of function `xmlStrcmp'
io.c:49: error: syntax error before "xmlChar"
io.c: At top level:
io.c:56: warning: type defaults to `int' in declaration of `cur'
io.c:56: error: `cur' used prior to declaration
io.c:56: error: invalid type argument of `->'
io.c:56: warning: data definition has no type or storage class
io.c:58: error: syntax error before "while"
io.c:63: warning: type defaults to `int' in declaration of
`vmdb_parse_movie'
io.c:63: warning: parameter names (without types) in function
declaration
io.c:63: warning: data definition has no type or storage class
io.c:64: error: syntax error before string constant
io.c:64: warning: type defaults to `int' in declaration of `printf'
io.c:64: warning: conflicting types for built-in function `printf'
io.c:64: warning: data definition has no type or storage class
io.c:67: warning: type defaults to `int' in declaration of `cur'
io.c:67: error: redefinition of `cur'
io.c:56: error: `cur' previously defined here
io.c:67: error: invalid type argument of `->'
io.c:67: warning: data definition has no type or storage class
io.c:68: error: syntax error before '}' token
io.c:70: warning: type defaults to `int' in declaration of `xmlFreeDoc'
io.c:70: warning: parameter names (without types) in function
declaration
io.c:70: warning: data definition has no type or storage class
io.c:71: error: syntax error before "return"
io.c:74: error: syntax error before "doc"
io.c:75: error: conflicting types for `vmdb_parse_movie'
io.c:63: error: previous declaration of `vmdb_parse_movie'
io.c: In function `vmdb_parse_movie':
io.c:76: error: `xmlChar' undeclared (first use in this function)
io.c:76: error: `key' undeclared (first use in this function)
io.c:77: error: `GtkTreeIter' undeclared (first use in this function)
io.c:77: error: syntax error before "iter"
io.c:78: error: `title' undeclared (first use in this function)
io.c:79: error: `year' undeclared (first use in this function)
io.c:80: error: `media' undeclared (first use in this function)
io.c:81: error: `quality' undeclared (first use in this function)
io.c:83: error: invalid type argument of `->'
io.c:85: warning: comparison between pointer and integer
io.c:87: error: invalid type argument of `->'
io.c:87: error: syntax error before "xmlChar"
io.c:90: error: syntax error before ')' token
io.c:94: warning: implicit declaration of function `free'
io.c:97: error: invalid type argument of `->'
io.c:97: error: syntax error before "xmlChar"
io.c:100: error: syntax error before ')' token
io.c: At top level:
io.c:107: error: syntax error before "if"
Completed ... unsuccessful
Total time taken: 3 secs
----------------------------------------------------------------------------------------------------------------------------

This should not happen. Because all needed #include files are added in
to io.c...

It seems that io.h (file included in to io.c) can't be found during the
project build.

I tried one other scenario:

1.Copied all required source and header files in to new folder.
2.Created custom makefile
----------------------------------------------------------------------------------------------------------------------------
CC      = gcc -Wall
CFLAGS  = `pkg-config --cflags --libs gtk+-2.0` `xml2-config --cflags`
LDFLAGS = `xml2-config --libs`
SRCS    = main.c gui.c io.c callbacks.c
OBJS    = $(SRCS:.c=.o)
HEADERS = gui.h callbacks.h io.h data_struct.h
TARGET  = vmoviedb
LIBS    = 

$(TARGET): $(OBJS)
	   $(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LDFLAGS) $(LIBS)

clean:
	rm *.o
	rm *~
	rm vmoviedb
----------------------------------------------------------------------------------------------------------------------------
3. Type make

Compilation of binary was successfully. No errors or warnings.

My mind tell's me that this have something to do with Anjuta. Can
someone help me?

If I'm wrong please excuse me!

P.S: Sorry for the bad English!

-- 
Vladimir Paskov
vlado-paskov mnet bg
ICQ# 152483711
Jabber: paskov jabber minus273 org





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