title: GTK+/GCC Crashing On Start
body: <p>I'm trying to learn how to use GTK in C.</p>
  
  <p>I'm developing using Eclipse CDT.  I copied the following code from an examples website:</p>
  
  <pre><code>#include &lt;gtk/gtk.h&gt;
  #include &lt;stdlib.h&gt;
  
  void displayUI()
  {
  GtkWidget* mainWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  
  gtk_window_set_default_size(GTK_WINDOW(mainWindow), 400, 300);
  gtk_window_set_title(GTK_WINDOW(mainWindow), "GTK Simple Example");
  gtk_window_set_position(GTK_WINDOW(mainWindow), GTK_WIN_POS_CENTER_ALWAYS);
  
  gtk_signal_connect(GTK_OBJECT(mainWindow), "destroy", G_CALLBACK(gtk_main_quit), NULL);
  
  gtk_widget_show_all(mainWindow);
  }
  
  int main(int argc, char *argv[]) {
  
  gboolean b = gtk_init_check(&amp;argc, &amp;argv);
  
  if(b == 0) {
      puts("Failed to init");
      exit(0);
  }
  
  gtk_init(&amp;argc, &amp;argv);
  
  displayUI();
  
  gtk_main();
  
  return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>Every time I try to run this program (or anything else involving GTK, Windows immediately displays a "InsertProgramNameHere.exe has crashed" message.</p>
  
  <p>I have MinGW, MinSYS, PKG-CONFIG and MAKE all properly installed.  The program compiles fine... it just won't run.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I found this error log.  There seems to be a dependency problem.</p>
  
  <pre><code>Faulting application TestRun.exe, version 0.0.0.0, time stamp 0x4f839a6a, faulting
  
  module libgtk-win32-2.0-0.dll, version 6.0.6002.18541, time stamp 0x4ec3e39f, exception 
  
  code 0xc0000135, fault offset 0x0006f52f, process id 0x1674, application start time 
  
  0x01cd16c174d3df90.
  </code></pre>