Re: statically linked GTK+ & glibc libraries





Hi John,

Thanks for your quick response. But my Makefile looks like this:

LIBFILE=-L/usr/X11R6/lib -lpthread -lm `gtk-config --libs gthread`

How should I change this? Does it matter for compiling? such as:

mainwin.o: mainwin.c webfone.h
   $(CC) `gtk-config --cflags` -c mainwin.c

Appreciate your help.

Daniel

 


 

>From: John Cupitt
>To: Daniel Ding
>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
>
>_______________________________________________
>gtk-list mailing list
>gtk-list gnome org
>http://mail.gnome.org/mailman/listinfo/gtk-list


Get your FREE download of MSN Explorer at http://explorer.msn.com


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