Re: Couldn't link my app with GTK+ 3



ä 2011å01æ31æ 16:56, David NeÄas åé:
On Mon, Jan 31, 2011 at 04:03:04PM +0800, Mike wrote:
OS: Fedora 14 x86_64
GCC: 4.5.1 20100924

I have a app project, use GTK+2.
I want to move it to GTK+3.
So I git clone latest glib.
Compiled them.
(I use GTK3 in mirror, not compile by myself)
Does pkg-config know about the new GLib?  I.e. did you set
PKG_CONFIG_PATH?  If it does not you cannot expect it to do anything
else than give you the flags for the system GLib.

Yeti


there are results..
------------------------------
$ pkg-config --cflags --libs glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -lglib-2.0
$ echo $PKG_CONFIG_PATH

$
------------------------------

Latest glib will be install to /usr/lib...


There is /usr/lib/pkgconfig/glib-2.0.pc (compile by myself)
------------------------------
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums

Name: GLib
Description: C Utility Library
Version: 2.27.94
Libs: -L${libdir} -lglib-2.0
Libs.private:
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include
------------------------------

And there is /usr/lib64/pkgconfig/glib-2.0.pc
------------------------------
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib64
includedir=/usr/include

glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums

Name: GLib
Description: C Utility Library
Version: 2.26.0
Libs: -L${libdir} -lglib-2.0
Libs.private:
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include
------------------------------

Well... How to modify PKG_CONFIG_PATH?
I try to:
------------------------------
$ export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
$ ./configure
.....
$ make -j2
......
CCLD gkiu
/usr/lib/gcc/x86_64-redhat-linux/4.5.1/../../../../lib64/libgtk-x11-3.0.so: undefined reference to `g_application_add_action' /usr/lib/gcc/x86_64-redhat-linux/4.5.1/../../../../lib64/libgtk-x11-3.0.so: undefined reference to `g_application_set_action_enabled' /usr/lib/gcc/x86_64-redhat-linux/4.5.1/../../../../lib64/libgtk-x11-3.0.so: undefined reference to `g_application_get_type' /usr/lib/gcc/x86_64-redhat-linux/4.5.1/../../../../lib64/libgtk-x11-3.0.so: undefined reference to `g_application_quit_with_data' /usr/lib/gcc/x86_64-redhat-linux/4.5.1/../../../../lib64/libgtk-x11-3.0.so: undefined reference to `g_application_run'
......
------------------------------

--
Mike.
Blog: http://ekd123.is-programmer.com/
Fedora Project Contributor.




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