Re: Statically linking gtk

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

 



On 7/12/06, Sergei Steshenko <sergstesh@xxxxxxxxx> wrote:
>
>
> --- Joe Van Dyk <joevandyk@xxxxxxxxx> wrote:
>
> > Hi,
> >
> > I have a gtkmm project that I'd like to statically link.  But I'm
> > running into difficulties.  I'm using Gtk and Gtkmm 2.4.
> >
> > Here's a sample.  I've heard Gtk is hard to statically link?  Why is that?
> >
> > g++ -o radar radar.cc \
> > `pkg-config gtkmm-2.4 --cflags` \
> > /tmp/builds/glib/2.4.8/rhel3/lib/libglib-2.0.a     \
> > /tmp/builds/glib/2.4.8/rhel3/lib/libgobject-2.0.a \
> > /tmp/builds/glib/2.4.8/rhel3/lib/libgmodule-2.0.a  \
> > /tmp/builds/glib/2.4.8/rhel3/lib/libgthread-2.0.a \
> > /tmp/builds/gtk/2.4.14/rhel3/lib/libgdk_pixbuf-2.0.a       \
> > /tmp/builds/gtk/2.4.14/rhel3/lib/libgdk-x11-2.0.a \
> > /tmp/builds/gtk/2.4.14/rhel3/lib/libgdk_pixbuf_xlib-2.0.a  \
> > /tmp/builds/gtk/2.4.14/rhel3/lib/libgtk-x11-2.0.a \
> > /tmp/builds/atk/1.8.0/rhel3/lib/libatk-1.0.a  \
> > /tmp/builds/libsigc++/2.0.17/rhel3/lib/libsigc-2.0.a \
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a  \
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libpangomm-1.4.a \
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libatkmm-1.6.a  \
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgtkmm-2.4.a  \
> > /tmp/builds/glibmm/2.4.8/rhel3/lib/libglibmm-2.4.a  \
> > /tmp/builds/glibmm/2.4.8/rhel3/lib/libglibmm-2.4.a
> >
> >
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x19):
> > In function `Gdk::Color::Color()':
> > /root/gtkmm-2.4.11/gdk/gdkmm/color.cc:38: undefined reference to
> > `gdk_color_copy'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x45):
> > In function `Gdk::Color::Color()':
> > /root/gtkmm-2.4.11/gdk/gdkmm/color.cc:38: undefined reference to
> > `gdk_color_copy'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x75):
> > In function `Gdk::Color::Color(Glib::ustring const&)':
> > /root/gtkmm-2.4.11/gdk/gdkmm/color.cc:44: undefined reference to
> > `gdk_color_copy'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0xad):
> > In function `Gdk::Color::Color(Glib::ustring const&)':
> > /root/gtkmm-2.4.11/gdk/gdkmm/color.cc:44: undefined reference to
> > `gdk_color_copy'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x4b7):
> > In function `Gdk::Color::set(Glib::ustring const&)':
> > ../../gdk/gdkmm/color.h:67: undefined reference to `gdk_color_parse'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x61d):
> > In function `Gdk::Color::Color(Gdk::Color const&)':
> > /root/gtkmm-2.4.11/gdk/gdkmm/color.cc:248: undefined reference to
> > `gdk_color_copy'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x645):
> > In function `Gdk::Color::Color(Gdk::Color const&)':
> > /root/gtkmm-2.4.11/gdk/gdkmm/color.cc:248: undefined reference to
> > `gdk_color_copy'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x668):
> > In function `Gdk::Color::Color(_GdkColor*, bool)':
> > /root/gtkmm-2.4.11/gdk/gdkmm/color.cc:256: undefined reference to
> > `gdk_color_copy'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x690):
> > In function `Gdk::Color::Color(_GdkColor*, bool)':
> > /root/gtkmm-2.4.11/gdk/gdkmm/color.cc:256: undefined reference to
> > `gdk_color_copy'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x761):
> > In function `Gdk::operator==(Gdk::Color const&, Gdk::Color const&)':
> > ../../gdk/gdkmm/color.h:70: undefined reference to `gdk_color_equal'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x785):
> > In function `Gdk::operator!=(Gdk::Color const&, Gdk::Color const&)':
> > ../../gdk/gdkmm/color.h:70: undefined reference to `gdk_color_equal'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x56a):
> > In function `Gdk::Color::rgb_find_color(Glib::RefPtr<Gdk::Colormap>
> > const&)':
> > ../../gdk/gdkmm/colormap.h:89: undefined reference to `gdk_rgb_find_color'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x5f9):
> > In function `Gdk::Color::get_type()':
> > /root/gtkmm-2.4.11/gdk/gdkmm/color.cc:241: undefined reference to
> > `gdk_color_get_type'
> > /tmp/builds/gtkmm/2.4.11/rhel3/lib/libgdkmm-2.4.a(color.o)(.text+0x701):
> > In function `Gdk::Color::~Color()':
> > /root/gtkmm-2.4.11/gdk/gdkmm/color.cc:268: undefined reference to
> > `gdk_color_free'
> > _______________________________________________
> > 
> > gtk-list@xxxxxxxxx
> > http://mail.gnome.org/mailman/listinfo/gtk-list
> >
>
> This is what I found in 'configure' of 'gtk+-2.8.20':
> "
>   --enable-static[=PKGS]
>                           build static libraries [default=no]
>   --enable-shared[=PKGS]
>                           build shared libraries [default=yes]
> ".
>
> Maybe you should try to use --enable-static ? Or 'gtkmm' is
> configured differently ?

Thanks, I did use the --enable-static option on everything.

Joe
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux