Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
618 views
in Technique[技术] by (71.8m points)

c - gtk/gtk.h: No such file or directory Windows

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:

  1. $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.

  1. '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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...