Re: [gtk-list] Re: Problem with execution of "Hello world" example



Whoops, disregard my messge...I thought you were referring to the C++
hello.cc program.  Did you just recently perform an upgrade of the gtk+
libraries?  It's possible that the problem was outdated information in the
/etc/ld.so.cache that (I believe) gets rebuilt on a reboot by calling the
ldconfig command.  Other than that, I have no ideas.

--Jason

On Thu, 16 Jul 1998, Andreas Wollny wrote:

> Hello,
> 
> 
> > Could you paste in your code here?  It's possible that some type caused
> > the problem.  Like you may have forgotten to create a dynamic widget with
> > the new operator or some such thing that is easy to overlook.
> 
> That seems funny to me, but after a reboot and new compilation of the hello world
> example it's running  :-)
> I don't know why.
> Maybe you could tell me, what was happening?
> 
> 
> The source was:
> --------------
> #include <gtk/gtk.h>
> 
> void hello (GtkWidget *widget, gpointer data)
> {
>     g_print ("Hello World\n");
> }
> 
> gint delete_event(GtkWidget *widget, GdkEvent *event, gpointer data)
> {
>     g_print ("delete event occured\n");
>     return (TRUE);
> }
> 
> void destroy (GtkWidget *widget, gpointer data)
> {
>     gtk_main_quit ();
> }
> 
> int main (int argc, char *argv[])
> {
>     GtkWidget *window;
>     GtkWidget *button;
>     gtk_init (&argc, &argv);
>     window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
>     gtk_signal_connect (GTK_OBJECT (window), "delete_event",
>                         GTK_SIGNAL_FUNC (delete_event), NULL);
>     gtk_signal_connect (GTK_OBJECT (window), "destroy",
>                         GTK_SIGNAL_FUNC (destroy), NULL);
>     gtk_container_border_width (GTK_CONTAINER (window), 10);
>     button = gtk_button_new_with_label ("Hello World");
>     gtk_signal_connect (GTK_OBJECT (button), "clicked",
>                         GTK_SIGNAL_FUNC (hello), NULL);
>     gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
>                                GTK_SIGNAL_FUNC (gtk_widget_destroy),
>                                GTK_OBJECT (window));
>     gtk_container_add (GTK_CONTAINER (window), button);
>     gtk_widget_show (button);
>     gtk_widget_show (window);
>     gtk_main ();
>     return 0;
> }
> 
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 
> 

-------------------------------------------------------------------------------
Jason A. Pfeil, Computer Science Graduate Student      101 Carothers Hall
http://www.cs.fsu.edu/~pfeil			       C3527 University Center
pfeil@cs.fsu.edu				       (850)644-8014



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