I am working on a version of Eclipse in C / C ++ to create a simple GTK application. However, I cannot compile a GTK sample from Eclipse.
I think gtk is installed correctly, using ubuntu package manager.
the code:
#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 followed the instructions here to configure the command line patterns"pkg-config --cflags --libs gtk+-2.0"
but I get the following errors:
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
A little disappointed, any help is much appreciated
source
share