看板 Python 關於我們 聯絡資訊
小弟想嘗試於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
mars90226:看起來像是linux的header檔 07/29 00:33
mars90226:確定是Window版本嗎? 07/29 00:34
uranusjr:我覺得應該是 compiler 的問題, Python 在 Windows 上應 07/29 00:40
uranusjr:該只有支援 MSVC 和 MinGW... 07/29 00:41
uranusjr:用其他的編譯器即使編得起來應該在 linking 的時候也會炸 07/29 00:43
uranusjr:除非你要自己從 source 編一個 interpreter 出來 orz 07/29 00:43
Thisisnotptt:恩 確定是windows的環境下,試了兩台電腦都會這樣, 07/29 01:41
Thisisnotptt:有點奇怪,因為編譯的時候還會跳出Pyconf.h,然後要 07/29 01:42
Thisisnotptt:求io.h的位置 07/29 01:42
Thisisnotptt:恩...看來應該是小弟CVI的問題,剛剛試著用DEV C 編 07/29 01:47
Thisisnotptt:譯就過了,沒跳錯誤,這好像是CVI的通病,剩的小弟再 07/29 01:49
Thisisnotptt:try看看到底CVI到底要怎麼裝上python= = 07/29 01:50
timTan:要不要先以 stdio 做串接的界面呢? 07/29 08:02