Reputation: 8985
I converted my python program into c code with Cython. Now I'm having trouble compiling it with the MS Visual studio compiler. I'm getting the error
C:\Python34\include\pyconfig.h(68) : fatal error C1083:
Cannot open include file: 'io.h': No such file or directory
I'm running the command from the conosle
cl /c main.c /nologo /Ox /MD /W3 /GS- /DNDEBUG
-Ic:\Python34\include -Ic:\Python34\PC /link /OUT:"main.exe"
Upvotes: 4
Views: 4438
Reputation: 5499
I navigated to C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include
on my computer, and the file io.h
did not exist. It seems that that the problem is the file, in fact, does not exist!
According to this other answer, it is a POSIX compatibility library: failing to compile a project, missing io.h file
I'm not sure why this file can be missing. This other answer suggested reinstalling things: Installation of Visual Studio 2010 (any edition) installs only 2 files in the C++ headers directory
Edit: Everything just worked when I navigated to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2017\Visual Studio Tools
. There were Developer Command Prompt for VS XXX
shortcuts. I opened one of them and all the compilation commands succeeded.
Upvotes: 3