[gtkmm] Compling the tutorial with pkg-config libs



Hi

I'm new to linux and GTK programming.
I tried to compile the first example in the tutorial with
the instruction:
g++ simple.cc -o simple `pkg-config gtkmm-2.0 --cflags
--libs` and got the following errors:

/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libgtkmm-2.0.so:
undefined reference to
`Glib::ObjectBase::_cpp_destruction_is_in_progress() const'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libgtkmm-2.0.so:
undefined reference to `Glib::wrap(_GdkDisplay*, bool)'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libgtkmm-2.0.so:
undefined reference to `Glib::wrap(_GdkScreen*, bool)'
collect2: ld returned 1 exit status

I have manually over written the output of "pkg-config
gtkmm-2.0 --libs" to
-Wl,--export-dynamic -L/usr/local/lib
 /usr/lib/libgtkmm-2.0.so /usr/lib/libgdkmm-2.0.so
/usr/lib/libatkmm-1.0.so -lgtk-x11-2.0
/usr/lib/libpangomm-1.0.so /usr/lib/libglibmm-2.0.so
-lsigc-1.2 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm
-lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0
-lgmodule-2.0 -ldl -lglib-2.0

and it works. But it defeats the purpose of having
pkg-config.

Can anybody help?

Thanks
Jaco
 
==
Download ringtones, logos and picture messages at Ananzi Mobile Fun.
http://www.ananzi.co.za/cgi-bin/goto.pl?mobile



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