arm-linux-gcc 编译hello.c发生错误 提示:hello.c:1:21:stdio.h没有文件或目录
本帖最后由 Geraldg 于 2013-08-04 09:45 编辑arm-linux-gcc 编译hello.c发生错误 提示:hello.c:1:21:stdio.h没有文件或目录
求大神解决这个问题
回复 1# Geraldg
arm-linux-gcc 与 gcc 是两回事
stdio.h 是标C的头文件 你编译 用GCC
arm-linux-gcc是交叉编译 当然没有stdio.h arm-linux-gcc 可编译的 hello.c:
#include <linux/init.h>
#include <linux/module.h>
static int __init helloworld_init(void)
{
printk(KERN_ALERT "My first helloworld kernel moudle!\n");
return 0;
}
static void __exit helloworld_exit(void)
{
printk("byebye!\n");
}
module_init(helloworld_init);
module_exit(helloworld_exit);
页:
[1]