简体   繁体   English

无法理解kern.osversion`16.7.0'

[英]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.

相关问题 OS X Yosemite中的gcc 4.9.1 - gcc:警告:无法理解kern.osversion &#39;14 .0.0&#39; - gcc 4.9.1 in OS X Yosemite - gcc: warning: couldn’t understand kern.osversion ‘14.0.0' 无法理解程序的 output - Couldn't understand the output of the program wsdl2h无法理解声明部分中提供的省略号(…) - wsdl2h couldn't understand elipsis (…) provided in declaration part 我不明白为什么我的 function 不起作用 - I couldn't understand why my function does not work 无法理解C中字符串和循环的这种意外行为 - Couldn't Understand this unexpected behavior of string and loop in C 不明白为什么 head = head-&gt;next 有效 - couldn't understand why head = head->next works 最大的回文产品-程序未运行,已编写解决方案,但无法理解问题 - Largest palindrome product - program not running, written solution but couldn't understand the problem For循环卡在C(cygwin)的函数调用中,非常奇怪的行为我无法理解 - For loop gets stuck in a function call in C (cygwin), very weird behavior i couldn't understand Redis源中的if-else块(简单动态字符串),我无法理解 - An if-else block in Redis source (Simple Dynamic Strings) which i couldn't understand 我无法理解使用 RaspberryPi 的温湿度传感器的源代码 - I couldn't understand the source code of Humidity & Temperature Sensor using RaspberryPi
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM