正在引用带有yocto配方生成文件的gcc,找不到stdint
对于Yocto1.8(fido),我使用一个简单的Yocto配方来运行正在引用带有yocto配方生成文件的gcc,找不到stdint,gcc,makefile,embedded-linux,yocto,Gcc,Makefile,Embedded Linux,Yocto,对于Yocto1.8(fido),我使用一个简单的Yocto配方来运行Makefile SUMMARY = "PCI kernel module" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=4a0f8ad6a793571b331b0e19e3dd925c" inherit module PR = "r0" PV = "1.0" SRC_URI = "file://Makefile \ file:/
Makefile
SUMMARY = "PCI kernel module"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=4a0f8ad6a793571b331b0e19e3dd925c"
inherit module
PR = "r0"
PV = "1.0"
SRC_URI = "file://Makefile \
file://COPYING \
file://code.c \
file://code.h \
"
S = "${WORKDIR}"
obj-m := code.o
SRC := $(shell pwd)
all:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
modules_install:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
clean:
rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
rm -f Module.markers Module.symvers modules.order
rm -rf .tmp_versions Modules.symvers
这是Makefile
SUMMARY = "PCI kernel module"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=4a0f8ad6a793571b331b0e19e3dd925c"
inherit module
PR = "r0"
PV = "1.0"
SRC_URI = "file://Makefile \
file://COPYING \
file://code.c \
file://code.h \
"
S = "${WORKDIR}"
obj-m := code.o
SRC := $(shell pwd)
all:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
modules_install:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
clean:
rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
rm -f Module.markers Module.symvers modules.order
rm -rf .tmp_versions Modules.symvers
在这个配方上运行bitbake
时,我得到以下编译错误
error: no include path in which to search for stdint.h
| # include_next <stdint.h>
| ^
错误:没有用于搜索stdint.h的包含路径
|#包括#下一步
| ^
编译时如何配置此配方以包含
gcc
?您的code.c
看起来像什么
您不能在模块中使用用户空间头,据我所知,
stdint.h
是来自用户空间的头 你的code.c
长什么样
您不能在模块中使用用户空间头,据我所知,
stdint.h
是来自用户空间的头 我认为这是工具链的问题
如果您的文件是.c文件,请在make文件中使用${CC}以在yocto中编译。
文件为.cpp,在make文件中使用${CXX}
然后它将使用yocto默认工具链编译我认为这是工具链的问题 如果您的文件是.c文件,请在make文件中使用${CC}以在yocto中编译。 文件为.cpp,在make文件中使用${CXX}
然后它将使用yocto默认工具链编译,这就是问题所在,将
stdint.h
替换为linux/types
。这就是问题所在,将stdint.h
替换为linux/types
。