arm-linux-gcc 编译hello.c提示:hello.c:1:21:stdio.h没有文件或目录

arm-linux-gcc是3.3.2版的,gcc是4.0版的。在shell 中查找arm-linux-gcc路径也能找到,为什么编译就出问题呢。
补充:在/etc/profile中最后我添加了(冒号前面是arm-linux-gcc路径,后面是有stdio.h路径)
export PATH=/usr/arm/cross/3.3.2/bin:/usr/arm/cross/3.3.2/include

hello.c内容是:
#include<stdio.h>

int main()
{
printf("Hello World!我好你好打架哈\n");
return 0;
}
以为是的我的版本的问题,我又装了arm-linux-gcc 3.4.1版本。在profile最后行换成3.4.1版本:export PATH=$PATH:/usr/arm/cross/3.4.1/bin
export PATH

然后在查看版本:arm-linux-gcc -v;开始一会是3.3.1(我原来的版本),一会又是3.4.1我现在版本。现在只显示3.3.1版本了。我都改成了3.4.1为什么是3.3.1?难道是我的fedora4.0版本的问题?

还是都不对呀!

第1个回答  2011-09-30
请执行如下编译: I是大写的i
$/usr/arm/cross/3.3.2/bin/arm-linux-gcc -I/usr/arm/cross/3.3.2/include -o hello hello.c
第2个回答  2011-09-29
你gcc命令怎么写的??追问

arm-linux-gcc -o hello hell.c编译报错。提示没有stdio.h呢。但是用gcc -o hello hell.c就能正常编译一个目标文件出来。
在在/etc/profile中最后我添加了变量的呀。(冒号是有stdio.h路径)
export PATH=/usr/arm/cross/3.3.2/bin:/usr/arm/cross/3.3.2/include

郁闷

相似回答