[SOLVED] "<gtk/gtk.h> not found" when trying to compile C GTK program.
by bcsm from LinuxQuestions.org on (#5MJVB)
Hi,
I'm on Linux Mint 20.2 Cinnamon, and I have libgtk-3-0 (already present by default) and libgtk-3-dev (via apt on command line) installed. gtk-3.0 is present in usr/include, with gtk, gdk and unix-print folders present inside.
When trying to compile a C program with an empty main() function and the only #include being <gtk/gtk.h>, this error is thrown: "fatal error: gtk/gtk.h: No such file or directory".
I made some progress by doing "#include <gtk-3.0/gtk/gtk.h>", however this just gave this error instead, in gtk.h: "/usr/include/gtk-3.0/gtk/gtk.h:30:10: fatal error: gdk/gdk.h: No such file or directory"
I'm using geany to edit, but using cc and gcc at command line produced the same errors.
How can I fix this? Thank you
I'm on Linux Mint 20.2 Cinnamon, and I have libgtk-3-0 (already present by default) and libgtk-3-dev (via apt on command line) installed. gtk-3.0 is present in usr/include, with gtk, gdk and unix-print folders present inside.
When trying to compile a C program with an empty main() function and the only #include being <gtk/gtk.h>, this error is thrown: "fatal error: gtk/gtk.h: No such file or directory".
I made some progress by doing "#include <gtk-3.0/gtk/gtk.h>", however this just gave this error instead, in gtk.h: "/usr/include/gtk-3.0/gtk/gtk.h:30:10: fatal error: gdk/gdk.h: No such file or directory"
I'm using geany to edit, but using cc and gcc at command line produced the same errors.
How can I fix this? Thank you