【发布时间】:2014-05-18 07:25:56
【问题描述】:
我想将一些用 Python 编写的函数添加到我的 C++ 程序中:
#include <iostream>
#include <Python.h>
using namespace std;
int main(){
int a = 0;
cout << a;
return 0;
}
但是当我使用推荐 g++ main.cpp -Wall -o main 编译这个程序时
我有一个错误:fatal error: Python.h: No such file or directory
我试图通过sudo apt-get install python2.7-dev 安装python2.7 -dev 来解决问题,但它没有帮助。有人可以建议我还能做些什么来解决这个问题吗?
【问题讨论】:
标签: python c++ python-2.7 ubuntu