包括C ++文件CDT中的Python.h [英] including Python.h in C++ file CDT
本文介绍了包括C ++文件CDT中的Python.h的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果这是一个愚蠢的问题,我深表歉意。但是我尝试用Google搜索,但找不到任何指向正确方向的东西。我只是想了解如何设置 cdt以理解我的python.h include。
I apologize if this is a silly question. But I tried to google this and I couldn't find anything to point me in the right direction. I'd just like to understand what I need to do to 'set-up' cdt to 'understand' my python.h include.
错误的陈述是这样的:
the erroneous statement is this:
#include <Python.h>
但我也尝试过
#include "Python.h"
CDT会以错误符号响应在侧面说明:
And CDT responds with an error sign on the side stating:
Multiple markers at this line
- fatal error: Python.h: No such file or
directory
- Unresolved inclusion: <Python.h>
我正在Ubuntu 12.04上使用Eclipse CDT Juno。任何指针都将很棒!
I am using Eclipse CDT Juno on Ubuntu 12.04. Any pointers would be great!
推荐答案
请参阅以下有关如何设置环境以使用cpython的路径。
please see this path of how to setup the environment in order to use cpython.
- 完全Linux的详细教程
- 一个小的 github 项目包含要在MAC OSx上使用的所有相关文件。
- 使用python-config以获得
Python.h
并连接到python的静态库,您应该将代码与之链接。
- fully detailed tutorial for Linux
- A small github project contains all the relevant files to use on MAC OSx.
- use python-config in order to get the paths to
Python.h
and to the static lib of python, which you should link your code with.
这篇关于包括C ++文件CDT中的Python.h的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文