免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3454 | 回复: 3
打印 上一主题 下一主题

[BootLoader] arm-linux-gcc 编译hello.c发生错误 提示:hello.c:1:21:stdio.h没有文件或目录 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-08-03 22:59 |只看该作者 |倒序浏览
本帖最后由 Geraldg 于 2013-08-04 09:45 编辑

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





求大神解决这个问题

捕获.PNG (37.39 KB, 下载次数: 27)

捕获.PNG

论坛徽章:
0
2 [报告]
发表于 2013-08-03 23:00 |只看该作者
回复 1# Geraldg


   

论坛徽章:
0
3 [报告]
发表于 2013-08-20 15:52 |只看该作者
arm-linux-gcc 与 gcc 是两回事
stdio.h 是标C的头文件 你编译 用GCC
arm-linux-gcc是交叉编译 当然没有stdio.h

论坛徽章:
0
4 [报告]
发表于 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);

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP