Re: how do i compile gtk program



立兰 谷 wrote:

hi all:
i use RH 7.1. i write a gtk "helloworld" program, i
compile it with "gcc -Wall -g helloworld.c -o
helloworld `pkg-config --cflags gtk+-2.0` \
`pkg-config --libs gtk+-2.0`", but fail.

RedHat-7.1 comes with no gtk+-2.0. How did you install the gtk+-2.0
(from RPMs
or sources) ?

the prompt is
"the file glibconf.h found fail.".i found thid file in
"/usr/include",but not catch. how could i do?

Hmm, maybe "glibconfig.h" ? It probably can be found in
"/usr/local/lib/glib-2.0/include"
for gtk+-2.0 (default for your system).


and how do i setup the envronment variant of the
directory of the include and the lib.

pkg-config uses PKG_CONFIG_PATH environment variable for the locating
of config files. On your system its probably must be
"/usr/lib/pkgconfig:/usr/local/lib/pkgconfig".
Please read man for pkg-config and gtk-doc
(gtk-doc/html/gtk/gtk-compiling.html, on-line reference
avalaible at www.gtk.org).

Olexiy




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