gtk-- problem



List:

I recently downloaded gtk-- (both 0.11.0 and 0.11.1)  and compiled them.  Then I tried making the hello.cc program and I get the errors below.

I don't understand what could be wrong...does anyone have any ideas???

paradisio% make 
g++ -I/export/packages/gtk--/lib/Gtk--/include -I/export/packages/gtk--/include -I/usr/X11R6/include -I/usr/local/lib/glib/include -I/usr/local/include -rdynamic -L/export/packages/gtk--/lib -L/usr/local/lib -L/usr/X11R6/lib -lgtkmm -lgdkmm -lgtk -lgdk -lgmodule -lglib -ldl -lXext -lX11 -lm  hello.cc -o hello
/export/packages/gtk--/lib/libgtkmm.so: undefined reference to `gtk_style_apply_default_background'
/export/packages/gtk--/lib/libgtkmm.so: undefined reference to `gtk_toggle_button_set_active'
/export/packages/gtk--/lib/libgtkmm.so: undefined reference to `gtk_check_menu_item_set_active'
collect2: ld returned 1 exit status
make: *** [hello] Error 1

paradisio% more hello.cc 
#include <gtk--.h>

//
// hello.cc
//
// This piece of hello world application shows many of the important
// features of gtk--.
//
// Watch for:
// 1) deriving widget from another
// 2) adding a widget inside another widget derived from Gtk_Container
// 3) connecting callbacks to their implementation 
// 4) showing widgets
// 5) overriding virtual members of existing widgets
// 6) instantiating widgets
// 7) initializing event loop
// 8) starting event loop
//

class HelloWorld : public Gtk_Window { // (1)
   Gtk_Button *b;
public:
   HelloWorld() : b( new Gtk_Button("Hello World") ) {
      add( b ); // (2)
      connect_to_method( b->clicked, Gtk_Main::instance(), &Gtk_Main::quit ); //
 (3)
      b->show(); // (4)
   }
   gint delete_event_impl(GdkEventAny *) { // (5) 
      Gtk_Main::instance()->quit(); 
      return 0;
   } 
};


int main( int argc, char **argv )
{
   Gtk_Main m( &argc, &argv ); // (7)
   HelloWorld w; // (6)

   w.set_usize( 100,20 ); 
   w.show(); // (4)

   m.run(); // (8)
   return 0;
}


 

Thanks in advance,

-- 
Kenneth Melero                          Imagelinks, Inc.
Software Engineer                       4450 W. Eau Gallie Blvd.
                                        Melbourne, FL  32934
 

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