Re: Statically linking Gtkmm



On 7/13/06, Alexander Gehlert <ageh raritan com> wrote:
Joe Van Dyk wrote:
> On 7/13/06, Alexander Gehlert <ageh raritan com> wrote:
>> Joe Van Dyk wrote:
>> > Hi,
>> >
>> > I'm trying to statically link the radar example.  Any chance someone
>> > could provide me with the appropriate g++ line?
>> >
>> > Here's a quick sample of my problem.  Did I miss a library or get
>> > something out of order?
>> >
>> > Thanks,
>> > Joe
>> >
>> > 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'
>
> <snip errors>
>
>> >
>> hi,
>>
>> I've got build gtkmm staticly, you will need to setup your own build
>> environment, and configure all your involved packages with
>> --enable-static and --disable-shared or something like --static
>> depending on the arguments the configure scribt takes...
>>
>> you also have to take care that the *.pc files are correct and to change
>> the pkg-config search path...
>> my target was to build an gtkmm application that only links dynamicly to
>> X , libC and stdc++ for that i needed to the following static packackes:
>>
>>  - expat, zlib, gettext, freetype, fontconfig, libpng, cairo, glib,
>> pango, atk, gtk, libsigc, glibmm, gtkmm
>>
>> it's working but it toke me a whole week to get it working so it's
>> really tricky...
>>
>> good luck
>
> I'm using Gtk 2.4 (so I don't need cairo).  I've built static
> libraries of:
>
> glib
> gtk
> atk
> pango
> libsigc++
> glibmm
> gtkmm
>
> You can see all the static libraries I have up above in that compile
> line.
>
>
>
ok you don't need cairo but therefore you need gdk!!!!


I'm including these libraries.  Does gdk need more?

/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  \



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