【发布时间】:2013-12-17 20:28:56
【问题描述】:
我正在尝试编译使用 Python.h 标头的代码。其实就是lcm库。
现在,我的系统上安装了 Python2.7 和 Python3.3。相应的头文件管理器位于/usr/include/python2.7/ 和/usr/include/python3.3m/。
问题是代码需要2.7版本,但是gcc总是更喜欢3.3版本。
我尝试设置./configure --prefix /bla/bla CPPFLAGS=-I/usr/include/python2.7/ 和export C_INCLUDE_PATH=/usr/include/python2.7,均无效。
中间的解决方法是将代码更改为#include <python2.7/Python.h>,但这使得它无法移植,因此它不能作为 lcm 人的修复...
一定有办法!!!
【问题讨论】:
-
你试过
--with-python=...了吗? -
@IgnacioVazquez-Abrams:感谢您的评论,现在就尝试过,不...不起作用
标签: python python-2.7 gcc python-3.x include-path