![](/img/trans.png)
[英]fatal error C1083: Cannot open include file: 'io.h': No such file or directory
[英]Compiling Cython code yields… fatal error C1083: Cannot open include file: 'io.h'
我使用Cython將我的python程序轉換為c代碼。 現在我無法使用MS Visual Studio編譯器進行編譯。 我收到了錯誤
C:\Python34\include\pyconfig.h(68) : fatal error C1083:
Cannot open include file: 'io.h': No such file or directory
我正在從conosle運行命令
cl /c main.c /nologo /Ox /MD /W3 /GS- /DNDEBUG
-Ic:\Python34\include -Ic:\Python34\PC /link /OUT:"main.exe"
我導航到我的計算機上的C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\include
,並且文件io.h
不存在。 似乎問題是文件,實際上並不存在!
根據另一個答案,它是一個POSIX兼容庫: 無法編譯項目,缺少io.h文件
我不確定為什么這個文件可以丟失。 另一個答案建議重新安裝: Visual Studio 2010(任何版本)的安裝僅在C ++頭文件目錄中安裝2個文件
編輯:當我導航到C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Visual Studio 2017\\Visual Studio Tools
時,一切正常。 有Developer Command Prompt for VS XXX
快捷方式的Developer Command Prompt for VS XXX
。 我打開其中一個,所有編譯命令都成功了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.