Article 5MJVB [SOLVED] "<gtk/gtk.h> not found" when trying to compile C GTK program.

[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 youlatest?d=yIl2AUoC8zA latest?i=bq38GM6VyhA:S9mu1D8z2-4:F7zBnMy latest?i=bq38GM6VyhA:S9mu1D8z2-4:V_sGLiP latest?d=qj6IDK7rITs latest?i=bq38GM6VyhA:S9mu1D8z2-4:gIN9vFwbq38GM6VyhA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments