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版本的问题?
还是都不对呀!
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
郁闷