External Library Access Problem

The following is the beginner’s file from the raspberrypi.org site. The C language file is saved as gtktest.c.
The problem I am experiencing is that the compiler does not recognize the gtk library. The error message that results from attempts to compile is “gtk/gtk.h not recognized”. This even though said file appears in the pkg-config file. I have searched extensively online and not found a solution. The underlying machine is a raspy 4.0 from Canakit. Any help would be greatly appreciated.
The file, the command line, and the pkg-config file appear below.
Another concern is that in Geany, Project/Properties is grayed out preventing attempts to compile under that medium. Furthermore, attempts to use the “L” and “l” directives in the command line result in the error message ’no such file” even when the said files are in the same directory as the source .c file.

#include <gtk/gtk.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
gtk_init (&argc, &argv);
GtkWidgit *win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widgit_show (win);
gtk_main ();

return 0;

}

command line

gcc pkg-config —cflags —libsgtk+=2.0 gtktest.c -o gtktest

pkg-config file

pi@raspberrypi:~ $ pkg-config --cflags --libs gtk±2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/arm-linux-gnueabihf/gtk-2.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype
pi@raspberrypi:~ $

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.