[9493] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] gtk_init wierdness

daemon@ATHENA.MIT.EDU (katre)
Thu Oct 22 09:22:04 1998

From: katre <katre@mousetrap.ml.org>
To: gtk-list@redhat.com
Date: Thu, 22 Oct 1998 09:23:33 -0400 (EDT)
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com


I am writing a gtk program.  (I am using gtk 1.0.6)  Whenever I remove the
"#ifdef ... #endif" from the below, the program crashes with the output,
"Starting gtk...

Error: *** Sigsegv caught."

With the #ifdef in to remove the code, it works fine.  Both ways, the program
compiles with no problems.  What could be going on?
I've commented out all code that actually calls the function, and it looks
correct.  I just don't get it.

katre
--------------------------------------------------------------------------------

/* main.c */
/* snippage */
int
main (int argc, char *argv[])
{
   /* initialization */
   printf("Starting gtk.\n");
   gtk_init(&argc, &argv);
   printf("Gtk has started.\n");
   return EXIT_SUCCESS;
}

/* files.c */
/* snippage */
int
close_files (void)
{
#ifdef NOT
   debug_print("Closing all files...");

   if (story_map != NULL)
   {
      bb_destroy_map(story_map);
   }

   fclose(story_file_p);
#endif

   return SUCCESS;
}

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post