[英]couldn't understand kern.osversion `16.7.0'
I am current trying to compile this simple code: 我目前正在尝试编译以下简单代码:
#include <gtk/gtk.h>
int main(int argc, char *argv[]) {
GtkWidget *window;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show(window);
g_signal_connect(window, "destroy",
G_CALLBACK(gtk_main_quit), NULL);
gtk_main();
return 0;
}
I am trying to run this command: 我正在尝试运行以下命令:
gcc -o simple simple.c `pkg-config --libs --cflags gtk+-2.0`
But I receiving this EM: 但是我收到了这个EM:
couldn't understand kern.osversion `16.7.0'
My system macOS version is 10.12.6 我的系统macOS版本是10.12.6
Ok I guess I found out what the issue was. 好的,我想我发现了问题所在。 The gcc version I was using was old although I installed a newer version through brew. 尽管我通过brew安装了较新的版本,但我使用的gcc版本还是旧的。 So what I did is to edit the Path variable like this: 所以我要做的是像这样编辑Path变量:
export PATH=/usr/local/bin:$PATH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.