Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Compiling against GTK gives parse and syntax errors (http://www.programmingforums.org/showthread.php?t=2374)

dan@george Feb 20th, 2005 10:39 PM

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?

Berto Feb 21st, 2005 2:38 AM

i would have a look on the gtk forums :/

dan@george Feb 21st, 2005 7:42 AM

Right, sorry to waste your time.


All times are GMT -5. The time now is 5:33 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC