Gtk-- 0.10.3 link errors



I made the mistake of trying to update to the latest
glib/gtk  (1.1.12) and Glib-- (0.10.3), and now can't get
things to compile.

I'm sure it's probably a missing parameter to the link,
because I get the same error when trying to link testgtkmm
with the command line, but it will link if I use the 'make'
command.

With the following test program

-------------------------------------------------------------
#include <gtk--.h>

class test1 : public Gtk_Window
{
public:
  test1() {}
  gint delete_event_impl(GdkEventAny*);
};

gint test1::delete_event_impl(GdkEventAny* )
{
}

int main(int argc, char* argv[])
{
        Gtk_Main m(&argc, &argv);
        test1 mw;
        mw.show();
        m.run();
        return EXIT_SUCCESS;
}
---------------------------------------------------------------

Using the following command to compile/link this (straight from the
documentation, with the addition of the -pedantic flag which is also
required), which worked on a previous version of Gtk-- (0.10.2, gtk
1.1.7)

$ g++ `gtkmm-config --cflags` -pedantic test1.cc `gtkmm-config --libs`

I get the following errors

/usr//lib/libgtkmm-1.1.so: undefined reference to
`Gdk_Window::unref(void)'
/usr//lib/libgtkmm-1.1.so: undefined reference to `Gdk_Window virtual
table'
collect2: ld returned 1 exit status

Am I missing something in the documentation? Or do I need to set up to
link with libtools and local copies of the libraries like the test
programs?

Also, shouldn't the -pedantic option be handled by the 'gtkmm-config'
command, since the build of Gtk-- (which creates gtkmm-config) should
know
if it was compiled -pedantic or not?



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