查看完整版本: [-- Linux下Qt Creator如何编译内核模块 --]

QTCN开发网 -> 其它技术开发讨论区 -> Linux下Qt Creator如何编译内核模块 [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

seiyagoo 2014-04-11 15:42

Linux下Qt Creator如何编译内核模块

Makefile中编译一个内核模块(假设最终为hello.ko)可以像下面这样写,

obj-m + = hello.o

all:
       make  -C  /lib/modules/$(shell uname-r)/build  M=$(PWD)  modules

clean:
       make -C /lib/modules/$(shell uname-r)/build   M=$(PWD)  clean


那Qt Creator里面的.pro该怎样实现相同的功能呢?
( 已在.pro文件添加INCLUDEPATH += /usr/src/$(shell uname -r)/include, 但是Qt Creator编译后提示fatal error: asm/cache.h: No such file or directory )


查看完整版本: [-- Linux下Qt Creator如何编译内核模块 --] [-- top --]



Powered by phpwind v8.7 Code ©2003-2011 phpwind
Gzip disabled