I have spent the past few days on and off scouring the internet for solutions to this problem, and every solution I have found just brings up more issues for me. I am inclined to believe this is because I am using windows, as opposed to using linux or similar, but I can't confirm.
Here is what I have tried:
- $sudo ...
This results results in me getting the message: 'sudo' is not recognized as an internal or external command, operable program or batch file
. This seems to be a command that is not on windows and has no clear replacement in this context.
- 'pkg-config'
I have seen various different versions of what to do and I can't remember which I have tried and which I have not. It does consistently give me the message pkg-config: No such file or directory
I'm really not sure where to go, as everything I have found has basically just been giving me one of these 2 solutions, but not really explaining what they do or where to use them. It is entirely possible that I am simply trying to do it in the wrong directory but don't realize it.
If it matters, this is the code I have. It's pretty sparse, as I just wanted to make sure gtk was working at all.
#include <gtk/gtk.h>
GtkWidget *window;
GtkWidget *button;
gtk_init(&argc, &argv);
I'm sure that this question has been answered somewhere else, but after hours of searching I couldn't find it, so I'm posting here.
EDIT: It seems y'all think I installed it incorrectly, and while that is possible and I have looked at what has been sent to me and tried it, I still don't know how to use GTK. The code I've compiled still has the same error.
I believe the problem is related to not having pkg-config
(as I stated above), and the only information I have found on how to get pkg-config
is using the sudo
command, which I believe is a Linux exclusive, or at least not native to Windows
question from:
https://stackoverflow.com/questions/66067757/gtk-gtk-h-no-such-file-or-directory-windows 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…