python构建完整应用程序错误怎么办_为什么我在构建python模块时遇到这个错误?...

我目前正在用C语言构建一个python模块,我已经跟随了一系列教程来了解我自己的构建点,并且我已经很好地掌握了正在发生的事情。在

但是,当我运行脚本来设置所有内容时,我有以下打印输出。看起来这个错误来自python-dev中的一个头文件;但是,我想在这里确认这不是我正在做的事情。我将包括错误代码,我可以提供其他文件的要求。在sudo python setup.py build

running build

running build_ext

building 'lidar' extension

arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/include -I/usr/include/python2.7 -c lidar_module.c -o build/temp.linux-armv6l-2.7/lidar_module.o

lidar_module.c: In function ‘lidar_test’:

lidar_module.c:8:6: warning: unused variable ‘sts’ [-Wunused-variable]

int sts = 0;

^

In file included from /usr/include/python2.7/Python.h:58:0,

from lidar_module.c:1:

lidar_module.c: At top level:

/usr/include/python2.7/pyport.h:802:39: error: expected ‘,’ or ‘;’ before ‘void’

# define PyMODINIT_FUNC void

^

lidar_module.c:24:1: note: in expansion of macro ‘PyMODINIT_FUNC’

PyMODINIT_FUNC initlidar(){

^

lidar_module.c:3:18: warning: ‘lidarError’ defined but not used [-Wunused-variable]

static PyObject *lidarError;

^

lidar_module.c:19:20: warning: ‘lidar_methods’ defined but not used [-Wunused-variable]

static PyMethodDef lidar_methods[] = {

^

error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

我偷看了一下头文件,在错误区域附近找到了这个。在

^{pr2}$

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值