View Single Post
Old Feb 20th, 2005, 10:39 PM   #1
dan@george
Newbie
 
Join Date: Jun 2004
Location: Middletown, CT
Posts: 3
Rep Power: 0 dan@george is on a distinguished road
Send a message via AIM to dan@george
Compiling against GTK gives parse and syntax errors

I'm trying to learn GTK in C, so I wrote a very simple program, which follows:
#include <gtk/gtk.h>

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

  gtk_init(&argc, &argv);

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_widget_show(window);

  gtk_main();
  return 0;
}
Kid stuff, right? So I think the problem is in my GTK libraries themselves. You see, when I compile this program using
gcc -o program program.c `gtk-config --cflags --libs`
I get lots and lots of output, mostly complaints about syntax and parse errors in the GTK header files. I'm assuming the good folks who wrote it are more careful than that, so I don't know what to think.

Does anybody know what this means?
__________________
Remember: no matter what odds you're up against, or how many times you've tried already, it can't hurt to SPAWN MORE OVERLORDS.

Last edited by dan@george; Feb 20th, 2005 at 11:25 PM.
dan@george is offline   Reply With Quote