问题现象
- 在Windows下编译Boost.Python失败:
- 提示
''::hypot' has not been declared'
- 提示
libpython27.a: error adding symbols: File format not recognized
或libpython36.a: error adding symbols: File format not recognized
等
- 提示
机器环境
环境 | 版本 |
---|---|
Windows | Win10 1709 |
Boost | 1.65.1 |
Mingw | 6.3 |
Python | 3.6.3 |
问题分析与解决方案
”::hypot’ has not been declared’
产生原因
- 由于头文件定义在Windows下水土不服,导致使用MinGW在Windows下编译Boost.Python时,找不到相关声明