作者Thisisnotptt (这不是PTT)
看板Python
标题[问题] C 呼叫Python
时间Mon Jul 29 00:05:05 2013
小弟想尝试於C语言中呼叫python,但是却於第一步include<Python.h>的部分出现错误,
错误讯息是缺少'io.h'以及'sys/stat.h'
小弟所使用的环境是 Python2.7 有安装 Python 2.6 与 Python(x,y) 套件
系统为Windows 64bit,C语言所使用的环境是LabwindowsCVI,
请问这种C include python file的问题有人有遇过吗?
请问是否有缺少必要档案或是流程有误呢? 谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 219.68.97.118
1F:→ mars90226:看起来像是linux的header档 07/29 00:33
2F:→ mars90226:确定是Window版本吗? 07/29 00:34
3F:→ uranusjr:我觉得应该是 compiler 的问题, Python 在 Windows 上应 07/29 00:40
4F:→ uranusjr:该只有支援 MSVC 和 MinGW... 07/29 00:41
5F:→ uranusjr:用其他的编译器即使编得起来应该在 linking 的时候也会炸 07/29 00:43
6F:→ uranusjr:除非你要自己从 source 编一个 interpreter 出来 orz 07/29 00:43
7F:→ Thisisnotptt:恩 确定是windows的环境下,试了两台电脑都会这样, 07/29 01:41
8F:→ Thisisnotptt:有点奇怪,因为编译的时候还会跳出Pyconf.h,然後要 07/29 01:42
9F:→ Thisisnotptt:求io.h的位置 07/29 01:42
10F:→ Thisisnotptt:恩...看来应该是小弟CVI的问题,刚刚试着用DEV C 编 07/29 01:47
11F:→ Thisisnotptt:译就过了,没跳错误,这好像是CVI的通病,剩的小弟再 07/29 01:49
12F:→ Thisisnotptt:try看看到底CVI到底要怎麽装上python= = 07/29 01:50
13F:推 timTan:要不要先以 stdio 做串接的界面呢? 07/29 08:02