Re: migration: next step



I'm pretty sure that some of those examples don't have a main()
function in the file. I know I found that when trying to compile some
of the example code shipped with gtk. Just write a simple main, like
the one I have below:

int
main (int argc, char **argv)
{
 GtkWidget *window;
 GtkWidget *view;

 gtk_init (&argc, &argv);

 window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 g_signal_connect (window, "delete_event", gtk_main_quit, NULL); /* dirty */

 /* You may need to replace this call with something else */
 view = create_view_and_model ();

 gtk_container_add (GTK_CONTAINER (window), view);

 gtk_widget_show_all (window);

 gtk_main ();

 return 0;
}

Good Luck!

Mark Kegel

On 7/18/06, William D. Tallman <wtallman olypen com> wrote:
Happy to report all egg removed from face!

Have the gtk+-2.0 tutorial, and compiled 'helloworld.c' without a hitch.
So I figured I'd do the same with the demos at the end: tictactoe,
gtkdial, and scribble-simple.  Wrong.

Cut and pasted each into a separate directory, three files each: header,
test and code.  Each of these spews what looks to be simple coding
errors at compile time.  Are these known to be problematic, and if so,
can someone point me to the fixes?  I don't know enough about gtk, much
less gtk-2.0, to handily correct them.

Do I need to post the errors?

Thanks for reading,

Bill Tallman

_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list




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