当前位置:  技术问答>linux和unix

make后出现的错误竟然与‘h’字符有关

    来源: 互联网  发布时间:2017-04-22

    本文导语:  hello.c文件: #include  #include  #include  MODULE_LICENSE("GPL"); static int _init hello_init(void) {     printk("hello,it works!/n"); } static void _exit hello_exit(void) {     printk("bye/n"); } module_init(hello_init); module_exit(hello_exit); Makefile文...

hello.c文件:

#include 
#include 
#include 
MODULE_LICENSE("GPL");

static int _init hello_init(void)
{
    printk("hello,it works!/n");
}

static void _exit hello_exit(void)
{
    printk("bye/n");
}

module_init(hello_init);
module_exit(hello_exit);

Makefile文件:

obj-m:=hello.o

LINUX_PATH:=/usr/src/linux-3.2.50

all:
        make -C $(LINUX_PATH) M=/home/Modules modules
clean:
        make -C $(LINUX_PATH) M=/home/Modules clean


make后出现的错误:
make后出现的错误竟然与‘h’字符有关[图片]

发现程序中遇到 'h' 字符就识别不出来,这是怎么回事?

|
dos2unix hello.c后再试试

|
static int _init hello_init(void)

红色的init前面需要两个下划线吧,

exit同理

|

|
Makefile文件中LINUX_PATH:=/usr/src/linux-3.2.50表示你当前KO模块依赖的内核版本是3.2.50,请问你当前系统的/usr/src/目录下还有其它版本的linux目录吗?先确定下你当前系统运行的内核版本是否是3.2.50

    
 
 

您可能感兴趣的文章:

  • linux安装codeblock 编译错误make: *** [all-recursive] 错误 1
  • 我已经用make clean编译成功了内核但是在make moduals时候处错误,然后又make menuconfig,我还需要make zImage吗?
  • make时,提示“[libsql.la] 错误 1” 和 “[all-recursive] 错误 1”
  • make bzImage时出现错误,怎么解决?
  • 关于linux搭建环境make的错误
  • make错误,求助。
  • 如果软件make错误了,咱们解决?一般步骤?
  • make错误
  • 编写内核模块程序的makefile文件make错误
  • 有关Debian 中 make 的错误
  • 问一下:网上下载的obexftp-0.25版make后有错误怎么解决
  • make ARCH=arm CROSS_COMPILE=arm-linu-错误
  • mingw+msys+mingw32ce make错误
  • Make后的错误,怎么办?在线等
  • make: *** [obj/rpctest.o] Error 1,这种错误如何定位?
  • 请问一个Makefile的错误(我现在用不了make,请高手救救我)
  • make后产生的一个错误提示,不懂代表什么意思。。
  • make menuconfig出现cripts/Menuconfig: line 104: syntax error near unexpected token `{错误
  • make时出现错误:*** No rule to make target `<built-in>'????
  • 请教:我 make 我的开发板的 uclinux-dist 时,出现先的错误,请各位大哥帮我分析,是不是我有什么步骤没有做?
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • cygwin make操作,出现no rule to make target all
  • HTML标签参考手册 iis7站长之家
  • 高手请进:linux下,安装bugzila时,出现make error 1。
  • 急!!高手请进:linux下,安装bugzila时,出现make error 1。
  • 请教在cygwin下使用make命令出现的一个问题?
  • 编译linux内核时make menuconfig出现的问题
  • ubuntu make内核源码的时候出现问题,求高手解决
  • ubuntu下make menuconfig后出现如下提示,但就是进不去配置页面
  • 我的jbuilder4在windows server 2000 每次make and run 后就在里面出现光标乱了
  • 执行make menuconfig 到出现蓝屏的配置窗口,这个命令做了一些什么动作?
  • 出现warning: assignment makes pointer from integer without a cast
  • 编译内核过程中, make xconfig出现的找不到文件errno.h的问题
  • 这里的类型都是指针啊怎么会出现warning: assignment makes pointer from integer without a cast
  • linux系统中的在运行make的时候出现/usr/bin/ld: cannot find -lfl怎么解决?谢谢!
  • 初学者,make xmiconfig 出现错误,没看懂,不知道怎么修改,请大家帮帮忙
  • make 出现的问题 “[root@chensheng gcc-3.4.5]# /opt/gcc-3.4.5/configure --prefix=/usr/”
  • uClinux-samsung编译过程make出现的问题
  • 初学,大家帮忙看下,我在make时总是出现创建线程失败的错误报告,为什么呢?
  • 有关make all; make clobber; make depend; make debug 的区别?
  • 我要缩减LINUX内核,make menuconfig时把一些选项去掉,再make dep没错,但再make bzImage时却会提错,但我make menuconfig时不改变任何选现(
  • make perl 模块的时候出错,make: *** No rule to make target,帮忙看看,谢谢。
  • 如何写出兼容于BSD MAKE、GNU MAKE、SOLARIS MAKE的条件编译Makefile?
  • 在solaris8.0我装了make3.81,下载了make-3.81-sol8-sparc-local.gz,为什么不能在任何目录下输入make?
  • 怎样验证自己的make是不是GNU的make?
  • 问一个很低级的问题:怎样卸载用make;make install方法安装的软件?
  • configure make make install 新手问题...
  • make zImage和make modules等问题请教~
  • debian下安装bind用./configure时提示安装bind时./configure提示whether make sets $(MAKE)... no
  • 第一次写make文件,报makefile:2: *** missing separator. Stop.错,make文件只有两行
  • make kernel make gcc
  • 50分的问题!make文件找不到? You don't seem to have 'make' or 'gmake' in your PATH


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,