Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1334487
  • 博文数量: 177
  • 博客积分: 3640
  • 博客等级: 中校
  • 技术积分: 1778
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-27 16:51
文章分类

全部博文(177)

文章存档

2014年(1)

2013年(10)

2012年(3)

2011年(163)

分类: LINUX

2011-05-08 09:01:58

$ make
make -C /lib/modules/2.6.18-1.2798a_FC6/build SUBDIRS=/home/njc/stuff/linux-labjack/driver/linux-2.6 modules
make[1]: Entering directory `/usr/src/redhat/BUILD/kernel-2.6.181.2798a_FC6'
CC [M] /home/njc/stuff/linux-labjack/driver/linux-2.6/labjack.o
/home/njc/stuff/linux-labjack/driver/linux-2.6/labjack.c:43:26: error: linux/config.h: No such file or directory
make[2]: *** [/home/njc/stuff/linux-labjack/driver/linux-2.6/labjack.o] Error 1
make[1]: *** [_module_/home/njc/stuff/linux-labjack/driver/linux-2.6] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/kernel-2.6.181.2798a_FC6'
make: *** [default] Error 2

A solution, which I based from a discussion in this blog http://www.phoronix.com/redblog/?p=blog&i=NTUwMA, would be to copy a config.h header file to your /lib/modules/KERNEL-VERSION/build/include/linux directory. If you have a previous kernel build on your computer you can copy the file from your /lib/modules/OLD-KERNEL-VERSION/build/include/linux directory. Alternatively you can just copy the code below into a self made config.h file

CODE
#ifndef _LINUX_CONFIG_H
#define _LINUX_CONFIG_H

#include

#endif
我试过了,可以行!
我也试过了,可以行的
阅读(9264) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~