Re: Linking error on Ubuntu
- From: Kjell Ahlstedt <kjell ahlstedt bredband net>
- To: Stefano Facchini <stefano facchini gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Linking error on Ubuntu
- Date: Thu, 27 Oct 2011 14:07:40 +0200
2011-10-18 15:56, Stefano Facchini skrev:
Hi,
could anyone using Ubuntu 11.10 have a look at bug 870662
(https://bugs.launchpad.net/ubuntu/+source/gtkmm3.0/+bug/870662) and
tell me if the same error is obtained?
Yes.
Basically, it seems that I cannot link against gtkmm-3.0 and
poppler-glib at the same time.
Actually, you cannot compile.
Look at the output from the following commands:
pkg-config --cflags gtkmm-3.0
pkg-config --cflags poppler-glib
pkg-config --cflags gtkmm-3.0 poppler-glib
The interesting parts are:
gtkmm-3.0: -I/usr/include/gtk-3.0
poppler-glib: -I/usr/include/gtk-2.0
gtkmm-3.0 poppler-glib: -I/usr/include/gtk-2.0 ... -I/usr/include/gtk-3.0
/usr/include/gdkmm-3.0/gdkmm/rgba.h contains
#include <gdk/gdk.h>
which will include gdk/gdk.h from gtk-2.0, but rgba.h requires the file
in gtk-3.0.
It's not possible to combine gtk-2.0 and gtk-3.0 in the same program.
You write in the Ubuntu bug:
1. The same test program compiles just fine with gtkmm-2.4.
Understandable. gtk-3.0 is not included.
2. The equivalent C program linked against gtk+-3.0 also compiles fine.
I guess that no header files are included from gtk-3.0, and that
it's not detected by your extremely simple test program. Have you tried
to compile a program that calls a function which exists only in gtk-3.0?
3. Moreover, I get no errors with other distributions I tried
(Archlinux, openSUSE 12.01), even with gtkmm-3.0
Don't know why. I don't know anything about poppler. I installed it
only to be able to run your test case. Is there a newer version that
uses gtk-3.0? (I got version 0.16.7.) Is the dependency on gtk (or gdk)
unnecessary?
Perhaps pkg-config (or its equivalents) in the other distributions make
the C preprocessor search /usr/include/gtk-3.0 before
/usr/include/gtk-2.0? Then gtkmm will be happy, but perhaps poppler
won't, if you compile a more complicated program than your test case.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]