Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Makefile 如何在make中添加另一个包含路径_Makefile - Fatal编程技术网

Makefile 如何在make中添加另一个包含路径

Makefile 如何在make中添加另一个包含路径,makefile,Makefile,我想在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

我想在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时,返回以下内容

mydev.c:10:20: fatal error: iostream: No such file or directory
 #include <iostream>
mydev.c:10:20:致命错误:iostream:没有这样的文件或目录
#包括

我应该添加到我的Mag文件中?

< P> IoSt流是C++头。内核是用C写的,那么stdio.h呢?我用stdio.h替换了iostream,但遇到了同样的问题。您不能使用libc中的任何内容,请参阅