python - '::hypot' 尚未声明

标签 python c++ machine-learning theano

我用的是python3.6 theano, 安装了 mingw-w64-x86-64,我的操作系统是 Win10_64,安装了 cuda, 看起来一切正常

theano.test() 没问题,说明我的 gpu 正在工作,

但它一直告诉我“错误:'::hypot' 尚未声明”

 C:/mingw64/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/cmath:1157:11: error: '::hypot' has 
 not been declared\r.    using ::hypot;\r.            ^~~~~\r. ", 

如有任何帮助,我们将不胜感激!

最佳答案

我在使用 mingw32 构建 python 文件时遇到了这个错误。 我打开了它说的文件 (C:/mingw64/lib/gcc/x86_64-w64-mingw32/6.3.0/include/c++/cmath:1157:11)
并将该行更改为

using ::_hypot;

或在此之前添加这一行:

#define hypot _hypot

然后问题就解决了!! 我知道这不是一个基本的解决方案,但它是我能找到的解决方案!!

关于python - '::hypot' 尚未声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42276984/

相关文章:

python - 有效地将数组的numpy数组转换为数组的pandas系列

c++ - 在关闭 RTTI 的情况下 boost 简单类的序列化 (-fno-rtti)

node.js - 按键下划线聚合哈希

python - Pandas - 计数项目

从数据列表中预测最有可能的项目的算法

python - 在 Python 中查询数据库并存储到数据结构中

python - 如何在单台机器上使用多处理运行 Locust

python - 如何将 "weak link"发送到 Mac OS X 上的 Python 框架?

c++ - 如何将有向图(邻接表)传递给 Dijkstra 算法 boost 以找到最短路径?

c++ - 如何返回函数的参数数量?