Geraldg 发表于 2013-08-03 22:59

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没有文件或目录





求大神解决这个问题

Geraldg 发表于 2013-08-03 23:00

回复 1# Geraldg


   

青天难下 发表于 2013-08-20 15:52

arm-linux-gcc 与 gcc 是两回事
stdio.h 是标C的头文件 你编译 用GCC
arm-linux-gcc是交叉编译 当然没有stdio.h

青天难下 发表于 2013-08-20 16:01

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]
查看完整版本: arm-linux-gcc 编译hello.c发生错误 提示:hello.c:1:21:stdio.h没有文件或目录