Re: [gtk-list] Re: Compiling Problems II



On Thu, 12 Nov 1998, Yasholomew Yashinski wrote:

>   Perhaps I didn't clarify, I use SuSE, and am not a programmer, I'd need
> to know which file to change, and how. I'd like to install GTK in order to
> try Gnome.. However GTK itself seems to be quite a task..
> Any help would be appreciated.

Okay then the following line is cut from your report and is part of the
line created by a Makefile .  There is a Makefile in each directory of the 
gtk distribution.  The ones we're interested in are in examples/ and gtk/
(I'm new to gtk+ also, but I did have the same problems you encountered
and fixed them myself so I'll try to remember what I did and explain it
to you now)

> > > > > -o testgtk  testgtk.o libgtk.la ../gdk/libgdk.la -L/usr/X11R6/lib -lXext
> > > > > -lX11 ../../glib-1.1.4/libglib-1.1.la -lm

The following snippet from the error means that the libgtk library is
trying to access a function that the linker can't find.  The linker can't
find the implementation for this function because its not in any of the
libraries its been told to link against.

> > > > > .libs/libgtk.so: undefined reference to `g_module_open'

 The library it needs to find is the gmodule.la from the glib-1.1.4
distribution.  You'll have to look in the glib-1.1.4 directories to find
the correct path.  Try:
	find . -name "*.la"

from the glib-1.1.4 directory.  One of the names should be gmodule???.la.
Remember this name.
Now go back to the gtk+ distribution and into the source subdirectory
(gtk/). What you need to find now is the entry in the Makefile that lists
which libraries gtk is to link against.

I haven't got the sources here (they're at home so if you want a patch
you'll have to wait till late tonight or tomorrow) so I'm doing this from
(faded) memory.  We should make these mods to Makefile.am or Makefile.in
at least but I'll just get you to modify Makefiles only for the moment.
You need to use grep or less or an editor to search for the list of
libraries.  There should be a line like:

gtk_LIBS=${glibdir}/glib-1.1.4.la

and there might be other stuff on the line also so just search for ".la"
You need add to this entry the path to the gmodule???.la that you found
earlier.

If I remember correctly you only have to add this entry to the
gtk/Makefile  (hmmm... I don't think the examples needed to be modified)

Another way to find the variable name we need to add to is to search the
Makefile for an entry for "testgtk" there should be a line with a command
that calls libtool and a few parameters one of those parameters will be an
environment variable that we need.  Awkward and probaly easier to use the
first method.

I hope this of some use.  My memory of the fix is somewhat faded.
When I get time later tonight or tomorrow I'll submit a patch.
You might also want to consider getting the latest snapshot from jimpicks
site as it may be fixed there by now.

Allan. (ARRae)



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