cant run an example - bonobo



Hi
I was trying to use an example from the documentation. The link to the example is
http://developer.gnome.org/doc/API/2.0/libbonoboui/libbonoboui-bonobo-selector.html#id2954521

I compile my program (which is just one page of code) with the following command line
gcc `pkg-config --cflags --libs libbonoboui-2.0 libgnomeui-2.0` main_test.c
But when I execute ./a.out , I get error saying
GLib-ERROR **: gmem.c:173: failed to allocate 2690308000 bytes
aborting...
The file main_test.c looks like this
=================================================================

#include <gnome.h>
#include <bonobo.h>

static guint tmpFunc(void){
     char *interfaces [] = { "IDL:Bonobo/Control:1.0", NULL };
   char *oaf_iid;
   oaf_iid = bonobo_selector_select_id (
   _("Please select a Control"), interfaces);

   g_warning ("You selected 's'", oaf_iid);

   g_free (oaf_iid);

   return(FALSE);
   }
int
main (int argc, char *argv[])
{
 GtkWidget *window1;
   BonoboUIContainer *ui_container;

   gnome_program_init ("test", NULL, LIBGNOMEUI_MODULE,
                     argc, argv,
                     NULL, NULL,
                     NULL);

   gtk_idle_add((GtkFunction)tmpFunc,NULL);
 bonobo_main ();
 return 0;
}
=================================================================
Can somebody tell me if I am doing something wrong?
Thanx a lot
Spundun
p.s. : I hope this is the right list




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