Dear Wallace,
Thanks for the tip, this patch to my Makefile fixed it:
--- Makefile.orig 2005-11-10 16:21:02.000000000 -0500
+++ Makefile 2005-11-10 16:19:52.000000000 -0500
@@ -2,12 +2,13 @@
OBJS = ${SOURCES:.c=.o}
CFLAGS = `pkg-config libglade-2.0 gtk+-2.0 --cflags`
LDADD = `pkg-config libglade-2.0 gtk+-2.0 --libs`
+LINKARGS = -Wl,-export-dynamic
CC = gcc
OPTIONS = -g -Wall
PACKAGE = h2h
all: ${OBJS}
- ${CC} ${OPTIONS} -o ${PACKAGE} ${OBJS} ${LDADD}
+ ${CC} ${OPTIONS} -o ${PACKAGE} ${OBJS} ${LDADD} ${LINKARGS}
.c.o:
${CC} ${OPTIONS} ${CFLAGS} -c $<
Shouldn't this be made clear in some of the GTK+/Glade documentation? I
have the official GNOME developers guide, and had all the major web
documentation open, and nothing seems to mention this necessity.
I know to some of you longtime C hackers, this may seem like a "basic"
fact about gcc and shared libraries, but for someone who hasn't done
years of C coding in the UNIX environment, it sure doesn't come as
obvious.
Thanks a bunch,
-Andrew
On Thu, 2005-11-10 at 11:52 -0800, Wallace Owen wrote:
> If it's just one handler that isn't being found but others are, and the
> others are in a separately linked lib, make sure when you link you use
> -Wl,-export-dynamic to export the symbols in your app so libglade can
> find it.
>
>
> // Wally
>
> On Thu, 2005-11-10 at 14:15 -0500, Andrew J. Montalenti wrote:
> > I am just coding my first GTK+ and Glade app in C, and running into
> > trouble at an early stage.
> >
> > Basically, I have designed an interface in Glade, and the interface
> > loads up find with glade_xml_new. However, glade_xml_signal_autoconnect
> > reports a warning in that it isn't able to find a signal handler for one
> > of my GtkMenuItems, despite the fact that I have defined the handler to
> > the API specification.
> >
> > I asked about this in #gtk+, and a person who claimed to have "much
> > libglade experience" said he was "stumped by this one."
> >
> > nm reports on the executable that on_open_avi_activate is seen as a
> > symbol, and it is so clearly defined that I really don't know what's
> > wrong.
> >
> > I've linked to my code as a gzip'ed tarball, and you should be able to
> > build it on any Linux system. When you run 'h2h', you will see a bunch
> > of warnings for libglade, but the one that doesn't make any sense is the
> > one for on_open_avi_activate. You can see the definition for this
> > handler in window.c.
> >
> > http://www.pixelmonkey.org/pub/h2h.tar.gz
> >
> > Thanks for any help solving this mysterious problem,
> > -Andrew
> >
> > _______________________________________________
> > gtk-app-devel-list mailing list
> > [email protected]
> > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________
gtk-app-devel-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list