天嵌 ARM开发社区

 找回密码
 注册
查看: 1590|回复: 2

在添加DIY驱动时找不到头文件

[复制链接]
zypeng1221 发表于 2011-9-25 20:18:52 | 显示全部楼层 |阅读模式
本帖最后由 zypeng1221 于 2011-9-25 20:21 编辑

在DIY驱动到系统中 按照例子写hello程序 编译的时候 显示没有这个头文件 不知道是为什么 用天嵌提供的源码也是会出现问题 怎么会连module.h都没有呢?
 楼主| zypeng1221 发表于 2011-9-26 17:52:54 | 显示全部楼层
1# zypeng1221

EmbedSky_hello.c:11:25: error: linux/module.h: No such file or directory
EmbedSky_hello.c:14:23: error: linux/init.h: No such file or directory
EmbedSky_hello.c:19: error: expected declaration specifiers or ‘...’ before string constant
EmbedSky_hello.c:19: warning: data definition has no type or storage class
EmbedSky_hello.c:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘EmbedSky_hello_init’
EmbedSky_hello.c:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘EmbedSky_hello_exit’
EmbedSky_hello.c:35: warning: data definition has no type or storage class
EmbedSky_hello.c:35: warning: parameter names (without types) in function declaration
EmbedSky_hello.c:36: warning: data definition has no type or storage class
EmbedSky_hello.c:36: warning: parameter names (without types) in function declaration
亚瑟王 发表于 2011-10-19 18:54:02 | 显示全部楼层
你应该是没有编译内核,就直接编译了模块,编译模块的前提是要先编译内核。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-10-1 19:32 , Processed in 1.023477 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表