compilation error in visual studio linked with pyt

2019-01-11 11:53发布

问题:

I am getting an error running:

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPYTHON -DJCC_VER="2.13" -D_java_generics -IX:\Java16/include -IX:\Java16/include/win32 -Ibuild\_CMMCore -IC:\Python26\lib\site-packages\jcc\sources -IC:\Python26\include -IC:\Python26\PC /Tpbuild\_CMMCore\CMMCore.cpp /Fobuild\temp.win32-2.6\Release\build\_CMMCore\CMMCore.obj /EHsc /D_CRT_SECURE_NO_WARNINGS

The following:

c:\python26\include\pyconfig.h(233) : fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2

I put C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include into PATH because it includes BaseTsd.h, but this didnt solve the problem. I dont think it has to do with the cases?

Any help would be very much appreciated!

回答1:

It's not the PATH it's INCLUDE environment variable.

http://msdn.microsoft.com/en-us/library/f2ccy3wt(v=vs.80).aspx



回答2:

I copy missing ".h" header files to "C:\Users\USERNAME\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include", and it works.