I'm taking my first foray into C/C++/GTK, and having trouble getting a basic GTK+ program to compile. I have sample.c. If I try to compile it with
Code:
$ gcc sample.c -o sample 'pkg-config --cflags --libs gtk+-3.0'
It complains about the package being unavailable.
Code:
Package gtk+3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+3.0' found
To troubleshoot, I have tried:
Code:
$ gcc sample.c -o sample
I get gtk/gtk.h No Such File Or Directory, obviously.
When I try
Code:
$ pkg-config --cflags gtk+-3.0
I get
Code:
-pthread -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libpng12
and
Code:
$ pkg-config --libs gtk+-3.0
gives me this:
Code:
Package gtk+3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+3.0' found
I am using a fresh install of Mint 15, and I have libgtk-3-dev and gtk+3.0 installed via apt-get, dependencies are satisfied. I know its basic, but I can't quite wrap my head around what I need to do.