vs安装pycrypto-2.6.1报错处理
程序员文章站
2022-07-12 15:41:11
...
错误提示:
winrand.c
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(27): error C2061: 语法错误: 标识符“intmax_t”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(28): error C2061: 语法错误: 标识符“rem”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(28): error C2059: 语法错误:“;”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(29): error C2059: 语法错误:“}”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(31): error C2061: 语法错误: 标识符“imaxdiv_t”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(31): error C2059: 语法错误:“;”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(41): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(42): error C2146: 语法错误: 缺少“)”(在标识符“_Number”的前面)
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(42): error C2061: 语法错误: 标识符“_Number”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(42): error C2059: 语法错误:“;”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(43): error C2059: 语法错误:“)”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(46): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(47): error C2146: 语法错误: 缺少“)”(在标识符“_Numerator”的前面)
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(47): error C2061: 语法错误: 标识符“_Numerator”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(47): error C2059: 语法错误:“;”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(47): error C2059: 语法错误:“,”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(49): error C2059: 语法错误:“)”
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(51): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(57): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(64): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(70): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(77): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(83): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(90): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
D:\Windows Kits\10\include\10.0.17134.0\ucrt\inttypes.h(96): error C2143: 语法错误: 缺少“{”(在“__cdecl”的前面)
处理方式:
修改文件 setup.py
def detect_modules (self):
# Read the config.h file (usually generated by autoconf)
if self.compiler.compiler_type == 'msvc' and False:
# Add special include directory for MSVC (because MSVC is special)
self.compiler.include_dirs.insert(0, "src/inc-msvc/")
ac = self.__read_autoconf("src/config.h")
else:
ac = self.__read_autoconf("src/config.h")
使special失效
然后拷贝\src\inc-msvc\config.h
到\src\config.h
编译即可。
上一篇: TypeScript 高级类型整理
下一篇: VS2017配置opencv3.2.0
推荐阅读
-
关系型数据库管理系统RDBMS的特点、MySQL安装处理报错
-
VirtualBox安装64位系统报错的处理方法
-
升级SilverLight为5.1.50907.0后,VS调试时报“无法启动调试--未安装 Silverlight Developer 运行时。请安装一个匹配版本”的处理办法
-
vs2010+visual assist安装报错“遇到了异常,这可能是由于某个扩展导致的”解决方案
-
vs安装pycrypto-2.6.1报错处理
-
解决安装vs2019后原vs2017项目无法编译各种报错的问题
-
升级SilverLight为5.1.50907.0后,VS调试时报“无法启动调试--未安装 Silverlight Developer 运行时。请安装一个匹配版本”的处理办法
-
Python Pycharm虚拟下百度飞浆PaddleX安装报错问题及处理方法(亲测100%有效)
-
grid安装过程报错:NS-40937以下主机名无效[rac2]问题处理
-
关系型数据库管理系统RDBMS的特点、MySQL安装处理报错