我想在我的linux内核驱动程序中使用iostream或stdlib.h,我有这个MakeFile
ifeq ($(KERNELRELEASE),)
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
.PHONY: build clean
build:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c
else
$(info Building with KERNELRELEASE = ${KERNELRELEASE})
obj-m := mydev.o
endif
当我在我的驱动程序代码中使用#include时,make返回
mydev.c:10:20: fatal error: iostream: No such file or directory
#include <iostream>
我应该在makefile中添加什么内容?
答案 0 :(得分:0)
iostream是一个C ++标头。内核用C
编写