Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

for years ago I downloaded GTK+-dev. Now I would create a programm with GTK+. Simply startet with the example on http://developer.gnome.org/gtk3/stable/gtk-getting-started.html, I get lots of errors(more than 100, 200 I think). Compiled with

gcc `pkg-config --cflags gtk+-3.0` -o main main.c `pkg-config --libs gtk+-3.0`

That are the first messages before i stop the process with [Ctrl]+[C]:

 In file included from /usr/include/gtk-3.0/gdk/gdk.h:31:0,
                 from /usr/include/gtk-3.0/gtk/gtk.h:30,
                 from main.c:1:
/usr/include/gtk-3.0/gdk/gdkversionmacros.h:137:6: Error: missing binary operator before token »(«
/usr/include/gtk-3.0/gdk/gdkversionmacros.h:145:5: Error: missing binary operator before token »(«
/usr/include/gtk-3.0/gdk/gdkversionmacros.h:148:5: Error: missing binary operator before token »(«
/usr/include/gtk-3.0/gdk/gdkversionmacros.h:154:5: Error: missing binary operator before token »(«
/usr/include/gtk-3.0/gdk/gdkversionmacros.h:162:5: Error: missing binary operator before token »(«
/usr/include/gtk-3.0/gdk/gdkversionmacros.h:168:5: Error: missing binary operator before token »(«
/usr/include/gtk-3.0/gdk/gdkversionmacros.h:176:5: Error: missing binary operator before token »(«
/usr/include/gtk-3.0/gdk/gdkversionmacros.h:182:5: Error: missing binary operator before token »(«
/usr/include/gtk-3.0/gdk/gdkversionmacros.h:190:5: Error: missing binary operator before token »(«

So there must be something wrong and i had the idea to "reinstall" GTK+ development files. But how can I do that? Which packages do I have to remove and install again?

Here is the output for pkg-config --cflags gtk+-3.0:

-pthread -I/usr/local/include/pango-1.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libpng12

And pkg-config --libs gtk+-3.0 gives:

-pthread -L/usr/local/lib -lgtk-3 -lgdk-3 -latk-1.0 -lgio-2.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0

Whats wrong with my GTK? Can I fix it or do I have to reinstall it?

Informations[edit]:

  • Ubuntu-Version: 12.04 (precise) (32-Bit), Linux 3.2.0-36-generic, GNOME 3.4.2
  • Installed with the package management system

Christoph

share|improve this question
    
The development files are in the package libgtk-3-dev. Did you install the library libgtk-3-0 from source code or with the package management system (sudo apt-get install libgtk-3-dev)? What version of Ubuntu do you use? Please edit the question to add this information. –  Nimmermehr Feb 1 '13 at 12:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.