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: Fri, 07 Sep 2001 12:53:07 +0100
Daniel Ding wrote:
> 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
Hi Daniel,
If you can, maybe you should think about switching to the automake/autoconf/etc.
tools, they make Makefiles much easier to maintain (I think).
Comment out your LIBFILE line, and work out what it all expands to. On my
machine, this would be:
LIBFILE = -L/usr/X11R6/lib -lpthread -lm -L/usr/local/lib \
-L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule \
-lgthread -lglib -lpthread -ldl -lXext -lX11 -lm \
Now insert the static/dynamic pairs around all the dodgy looking libraries. In
my experience, you need to statically link against:
-lgtk -lgdk -lgmodule -lgthread -lglib
and no others. Your mileage may vary :-)
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]