我正在尝试使用ICC编译器在C语言中编译一个简单的hello world程序,但是我的头文件非常混乱。当我尝试编译文件时,标头中有某种错误。我试图弄清楚如何纠正此错误或重新安装所有标头为usr / local / include(我的主目录)。
我尝试将所有标头从opt / intel / compilers_and_libraries / mac / include /复制到usr / include目录,但是似乎不起作用。
我的代码只是标准的hello world程序
#include <stdio.h>
int main(void){
printf("hello world\n");
}
输出就是这样
In file included from /usr/local/include/asm/posix_types.h(21),
from /usr/local/include/linux/posix_types.h(32),
from /usr/local/include/linux/types.h(24),
from /usr/local/include/sys/types.h(35),
from /usr/local/include/stdio.h(50),
from hello.c(1):
/usr/local/include/asm/sgidefs.h(22): error: #error directive: Use a Linux compiler or give up.
#error Use a Linux compiler or give up.