1

I get the following error when I try to compile my application. I have installed all dependencies using Homebrew, looked at output from "brew doctor", nothing clear on how to solve this problem.

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

In file included from /usr/local/Cellar/glib/2.42.0/include/glib-2.0/glib/gtypes.h:32:0,
                 from /usr/local/Cellar/glib/2.42.0/include/glib-2.0/glib/galloca.h:32,
                 from /usr/local/Cellar/glib/2.42.0/include/glib-2.0/glib.h:30,
                 from /usr/local/Cellar/gtk+3/3.14.4/include/gtk-3.0/gdk/gdkconfig.h:13,
                 from /usr/local/Cellar/gtk+3/3.14.4/include/gtk-3.0/gdk/gdk.h:30,
                 from /usr/local/Cellar/gtk+3/3.14.4/include/gtk-3.0/gtk/gtk.h:30,
                 from gui.c:5:
/usr/local/Cellar/glib/2.42.0/lib/glib-2.0/include/glibconfig.h:12:19: fatal error: float.h: No such file or directory

With pkg-config --cflags gtk+-3.0

-D_REENTRANT -I/usr/local/Cellar/gtk+3/3.14.4/include/gtk-3.0 -I/usr/local/Cellar/at-spi2-atk/2.14.1/include/at-spi2-atk/2.0 -I/usr/local/Cellar/at-spi2-core/2.14.0/include/at-spi-2.0 -I/usr/local/Cellar/d-bus/1.8.8/include/dbus-1.0 -I/usr/local/Cellar/d-bus/1.8.8/lib/dbus-1.0/include -I/usr/local/Cellar/gtk+3/3.14.4/include/gtk-3.0 -I/usr/local/Cellar/glib/2.42.0/include/gio-unix-2.0/ -I/usr/local/Cellar/cairo/1.14.0/include/cairo -I/usr/local/Cellar/pango/1.36.8/include/pango-1.0 -I/usr/local/Cellar/harfbuzz/0.9.35_1/include/harfbuzz -I/usr/local/Cellar/pango/1.36.8/include/pango-1.0 -I/usr/local/Cellar/atk/2.14.0/include/atk-1.0 -I/usr/local/Cellar/cairo/1.14.0/include/cairo -I/usr/local/Cellar/pixman/0.32.6/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.11.1/include -I/usr/local/Cellar/freetype/2.5.3_1/include/freetype2 -I/usr/local/Cellar/libpng/1.6.13/include/libpng16 -I/usr/local/Cellar/gdk-pixbuf/2.30.8/include/gdk-pixbuf-2.0 -I/usr/local/Cellar/libpng/1.6.13/include/libpng16 -I/usr/local/Cellar/glib/2.42.0/include/glib-2.0 -I/usr/local/Cellar/glib/2.42.0/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/opt/X11/include 

With pkg-config --libs gtk+-3.0

-L/usr/local/Cellar/gtk+3/3.14.4/lib -L/usr/local/Cellar/pango/1.36.8/lib -L/usr/local/Cellar/atk/2.14.0/lib -L/usr/local/Cellar/cairo/1.14.0/lib -L/usr/local/Cellar/gdk-pixbuf/2.30.8/lib -L/usr/local/Cellar/glib/2.42.0/lib -L/usr/local/opt/gettext/lib -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl
2
  • Have you used clang instead of gcc?
    – Braiam
    Nov 11 '14 at 2:36
  • Yes, when I run clang I get "gui.c:6:10: fatal error: 'vte/vte.h' file not found" I want to build an interface that has an embedded gnome terminal.
    – Jackson
    Nov 11 '14 at 3:12
1

Solved the problem, I used the following to compile my app, I wasn't specifying the vte library.

clang -Wall -g gui.c -o gui pkg-config --cflags --libs gtk+-3.0 vte

1
  • You should mark your own answer...
    – eyoung100
    Dec 2 '14 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.