I'm fiddling around with the C/C++ version of Eclipse to build a simple GTK app. However, I can't seem to be able to compile a GTK sample from within Eclipse.
I think gtk is installed properly, used the ubuntu Package manager.
the code is:
#include <gtk-2.0/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;
}
and I have followed the instructions here to set up the Command line patterns "pkg-config --cflags --libs gtk+-2.0"
but I get these error:
Building file: ../src/GTKtestC.c
Invoking: GCC C Compiler
gcc -I/usr/include/gtk-2.0 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/GTKtestC.d" -MT"src/GTKtestC.d" -o"src/GTKtestC.o" "../src/GTKtestC.c" pkg-config --cflags --libs gtk+-2.0
gcc: pkg-config: No such file or directory
gcc: gtk+-2.0: No such file or directory
cc1: error: unrecognized command line option "-fcflags"
cc1: error: unrecognized command line option "-flibs"
make: *** [src/GTKtestC.o] Error 1
Getting a little frustrated, any help much appreciated