求教!!!python里面的CFFI问题
首先安装好了CFFI模块之后,从网上找到了几个简单的代码:
from cffi import FFI
ffi = FFI()
ffi.cdef(""" // some declarations from the man page
struct passwd {
char *pw_name;
...;
};
struct passwd *getpwuid(int uid);
""")
C = ffi.verify(""" // passed to the real C compiler
#include <sys/types.h>
#include <pwd.h>
""")
p = C.getpwuid(0)
assert str(p.pw_name) == 'root'
=====================================================
然后运行报错如下:
fatal error C1083:---此处为不可识别字符--- pwd.h---此处为不可识别字符---: No such file or directory
。。。。。。。。。。。。。。。。。。
ffiplatform.VerificationError: CompileError: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2
================================================
因为应对CFFI的某个BUG,所以安装了VS2008,之后出现这种问题,实在没办法了,求解!!!!!!!!!!
PS:添加环境变量的办法已经用过了,没用。