Re: [gtkmm] Compling the tutorial with pkg-config libs



On Thursday 20 November 2003 15:40,
Murray Cumming Comneon com wrote:
> > I'm new to linux and GTK programming.
>
> It would help to know about your distro and how you
installed gtkmm.

I down loaded gtkmm-2.2.8 and make a RPM my using the spec
file in the package

>
> > 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
>
> Were these the only errors, or did you see hundreds?

Yes that is the only errors

>
> > 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
>
> Did you change something, or is that exactly what
pkg-config outputs?

Yes I changed the reference to the gtkmm libraries.
"pkg-config gtkmm-2.0 --libs" returns 
-Wl,--export-dynamic -L/usr/local/lib -lgtkmm-2.0
-lgdkmm-2.0 -latkmm-1.0 -lgtk-x11-2.0 -lpangomm-1.0
-lglibmm-2.0 -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.
>
> Murray Cumming
> www.murrayc.com
> murrayc usa net
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
 
==
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]