[Glade-users] gladelib won't tackle GtkMainWin



Are you saying GtkMainWin is depreated?

Should I use the GTK+ widgets instead of the GNOME ones.

I guess so (doesn't seem to be a difference anyways).

Neither gimp nor glade uses it anyways. :-)

Perhaps it should appear in a separate GNOME deprecated widgets list. :-)

Reagrds,

Neil

On Fri, 22 Oct 2004 02:10:12 -0700, Rikke D. Giles
<rgiles centurytel net> wrote:
I'm sorry, I don't really have time to log in and fix this for you.

What system are you using, and which versions?  Try adding the gtk1
libs to your compile paths.  Also look and see if you have the
disable_deprecated switch on.  If it is, try turning it off.



Rikke

On 2004.10.21 23:05, Neil Zanella wrote:
I'm desperate to get this working... almost everything works except
for this...

log into my computer at 68.149.205.2 user jd password jd if you think
you can help

figure out what the problem is,

Thanks,

Neil

#
# export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig
#

CXX=g++

all: whm

whm: main.o
        ${CXX} -o whm `pkg-config --libs libglade-2.0 libgda` \
                       main.o

main.o: main.c
        ${CXX} -c `pkg-config --cflags libglade-2.0 libgda` \
        main.c
[nzanella@S01060080c6fd1f22 whm]$ pkg-config --libs libglade-2.0
libgda
-Wl,--export-dynamic -lglade-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -
latk-1.0
-lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -
lgobject-2.0
-lgmodule-2.0 -ldl -lgda-2 -lglib-2.0 -lxslt -lxml2 -lpthread -lz -lm
[nzanella@S01060080c6fd1f22 whm]$ pkg-config --cflags libglade-2.0
libgda
-I/usr/include/libglade-2.0 -I/usr/include/gtk-2.0
-I/usr/include/libxml2 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include
-I/usr/include/freetype2 -I/usr/include/freetype2/config
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/libgda-1.1




On Thu, 21 Oct 2004 19:47:19 -0700, Rikke D. Giles
<rgiles centurytel net> wrote:
What's your makefile look like?  and what compiler options are you
using?

ie what libs is it compiling against?  The errors are familiar to
me
because when I changed over to glade2 my older glade files, even
though
they had been brought 'up to date' had some old gtk1 stuff hanging
around, and it was being compiled only against gtk2.

Rikke




On 2004.10.21 11:23, Neil Zanella wrote:
I don't get the problem... and can't get a stack trace because
it's
not dumping core.
I am not compiling anything fancy...

$ cat test.c

#include <glade/glade.h>

void some_signal_handler_func(GtkWidget *widget, gpointer
user_data)
{
  /* do something useful here */
}

int main(int argc, char *argv[]) {
    GladeXML *xml;

    gtk_init(&argc, &argv);

    /* load the interface */
    xml = glade_xml_new("main.glade", NULL, NULL);

    /* connect the signals in the interface */
    glade_xml_signal_autoconnect(xml);

    /* start the event loop */
    gtk_main();

    return 0;
}

... and main.glade has a main window from the GNOME widgets and
nothing else

$ rpm -q glade2
glade2-2.6.4-1

$ rpm -q libglade2
libglade2-2.4.0-1

$ pkg-config libglade-2.0 --libs
-Wl,--export-dynamic -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lpthread
-lz
-lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0
-lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl
-lglib-2.0


$ gcc -o test `pkg-config libglade-2.0 --cflags --libs` test.c
]$ ./test

(test:29669): GLib-GObject-CRITICAL **: file gobject.c: line 1222
(g_object_get): assertion `G_IS_OBJECT (object)' failed

(test:29669): GLib-GObject-CRITICAL **: file gobject.c: line 1222
(g_object_get): assertion `G_IS_OBJECT (object)' failed
Segmentation fault
$ gcc -o test `pkg-config libglade-2.0 --cflags --libs`
-L/usr/lib/libgtk-x11-2.0.so.0 test.c
$ ./test

(test:29669): GLib-GObject-CRITICAL **: file gobject.c: line 1222
(g_object_get): assertion `G_IS_OBJECT (object)' failed

(test:29669): GLib-GObject-CRITICAL **: file gobject.c: line 1222
(g_object_get): assertion `G_IS_OBJECT (object)' failed
Segmentation fault

What can I do? I have a standard Fedora Core 2 installation...

On Thu, 21 Oct 2004 03:49:31 -0700, Rikke D. Giles
<rgiles centurytel net> wrote:
Hello,

The paths to your libs are screwed up somehow.  This is nothing
really
to do with glade itself, but your installation.  Run ./
configure
again,
or whatever, and make sure ldconfig has done its magic.  Also
make
sure
you are compiling against the correct libs.  Glade 2 natively
does
NOT
compile against glade1 (gtk1.*) stuff.  Your GtkClist is gtk1.*
stuff.
It's been deprecated since Gtk2.0 came out, several YEARS ago.

This problem has come up time and again, ever since we all
switched
to
Gtk2.0 and above, with people using the old gtk libs.  Check
the
list
archives for more detailed answers.

Rikke












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