[Xfc-dev] Compiling tutorial/chapter_4
Jeff Franks
jcfranks at tpg.com.au
Tue Aug 2 04:33:41 CEST 2005
Sylvain Vedrenne wrote:
>Hi,
>
>When trying to compile the example from chapter 4 of the tutorial, I get
>the following errors:
>
>sylvain at totoro:~/BIG/XFC_Dev/Sylvain/ch04$ make
> g++ xfcapp.cc -o xfcapp `pkg-config xfcui-4.3 --cflags --libs`
> xfcapp.cc:9:32: gconf/gconf-client.h: No such file or directory
> xfcapp.cc: In constructor `XfcApp::XfcApp()':
> xfcapp.cc:52: error: `GConfClient' undeclared
> (first use this function)
> xfcapp.cc:52: error: (Each undeclared identifier is reported only
> once for each function it appears in.)
> xfcapp.cc:52: error: `client' undeclared (first use this function)
> xfcapp.cc:52: error: `gconf_client_get_default' undeclared
> (first use this function)
> xfcapp.cc:53: error: `gconf_client_get_string' undeclared
> (first use this function)
> make: *** [xfcapp] Error 1
>
>So I tried adding `pkg-config gconf --cflags --libs` to the Makefile,
>but then I get these errors instead:
>
> sylvain at totoro:~/BIG/XFC_Dev/Sylvain/ch04$ make
> g++ xfcapp.cc -o xfcapp `pkg-config xfcui-4.3 --cflags --libs` \
> `pkg-config gconf --cflags --libs`
> In file included from /usr/include/gconf/1/gconf/gconf-error.h:25,
> from /usr/include/gconf/1/gconf/gconf-value.h:25,
> from /usr/include/gconf/1/gconf/gconf-schema.h:26,
> from /usr/include/gconf/1/gconf/gconf.h:29,
> from /usr/include/gconf/1/gconf/gconf-client.h:26,
> from xfcapp.cc:9:
> /usr/include/gconf/1/gconf/gconf-glib-public.h:32: error:
> redefinition of `struct _GError'
> /usr/include/glib-2.0/glib/gerror.h:31: error:
> previous definition of `struct _GError'
> make: *** [xfcapp] Error 1
>
>Please what can I do to solve the issue?
>
>
That's my fault. In chapter06 the tutorial documentation tells you that
the examaple requires GConf 2.0. Most distributions install GConf 2.0 so
it should not be a problem. However, I overlooked the fact that
chapter04 also uses GConf. I'll fix the chapter04 instructions for
writing the Makefile. Try adding gconf-2.0 to pkg-config instead of
gconf'... that should work.
>
>BTW in chapter 3 there is an incorrect reference to a former name of
>XFC, "Inti", here:
> // Always remember this step, this tells Inti that our preparation
>for this button is complete,
> // and it can now be displayed.
> button->show();
>"
>
>
Thank you... fixed.
>Sylvain.
>
>
>
Jeff.
More information about the Xfc-dev
mailing list