我只是在学习使用Boost.Python,所以如果它看起来很愚蠢,不好意思。 我从here这些代码包装在python中的C++函数。 我也搜索了几个小时找到一个工作的例子,最相关的问题是this,但我仍然有构建和运行的问题。 这是zoo.cpp #include <boost/python.hpp>
#include <string>
/*
* This is the C++ functi
我试图构建一个可加载的内核模块依赖于几个源文件,但我得到这个错误: /home/.../Uart.h:3:28: fatal error: linux/spinlock.h: No such file or directory
#include <linux/spinlock.h>
^
主要模块的代码都在一个文件(称之为“xdev.c”)。依赖关系大多是我需要在模块中调用