Re: statically linked GTK+ & glibc libraries
- From: John Cupitt <john cupitt ng-london org uk>
- To: Daniel Ding <danielding hotmail com>
- Cc: gtk-list gnome org
- Subject: Re: statically linked GTK+ & glibc libraries
- Date: Wed, 05 Sep 2001 19:05:16 +0100
Daniel Ding wrote:
> I am a developer of Freewebfone for Linux, a free video phone software based
> on GTK+. We can compile and run Freewebfone on Red Hat Linux. However, many
> users complained they were unable run it on other distributions such as SuSE
> or Debian as they got dependency errors to the glibc libraries.
>
> Is there a way that we can link GTK+ & glibc libraries statically? How to do
> that?
Hi Daniel, take a look at the Makefile generated by automake for your project.
Look for LDADD and check the libraries you are linking against. Every time you
see a library which might cause a problem (eg. libtiff, libgtk, etc.), wrap a
"-Wl,-Bstatic" / "-Wl,-Bdynamic" pair around it.
For example:
LDADD = -L/usr/X11R6/lib \
-Wl,-Bstatic -lgtk -lgdk -rdynamic -lgmodule -lglib -Wl,-Bdynamic \
-lXi -lXext -lX11 -lXpm -lSM -lICE \
-Wl,-Bstatic -ltiff -ljpeg -lz -Wl,-Bdynamic \
-lm -lpthread -ldl
As far as I know, there's no way to do this automatically :-(
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]