在C中嵌入Python ---帮助! [英] Embedding Python in C ---HELP!
本文介绍了在C中嵌入Python ---帮助!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
输入which python我确认我的环境中有python。我的python版本是2.6.5。但是,当我包含Python.h(#include< python.h>)时,我收到错误:
#gcc -o EmbPythonInC_1.exe EmbPythonInC_1.c
EmbPythonInC_1.c:2:20:致命错误:Python.h:没有这样的文件或目录
编译终止。
谢谢,
Tom
By typing "which python" I confirmed that I have python in my environment. The version my python is 2.6.5. However when I include Python.h (#include <python.h>) I got the error:
# gcc -o EmbPythonInC_1.exe EmbPythonInC_1.c
EmbPythonInC_1.c:2:20: fatal error: Python.h: No such file or directory
compilation terminated.
Thanks,
Tom
推荐答案
这里有你需要的内容...
http://en.wikibooks.org/wiki/Python_Programming/Extending_with_C [ ^ ]
Here may contents you need...
http://en.wikibooks.org/wiki/Python_Programming/Extending_with_C[^]
这篇关于在C中嵌入Python ---帮助!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文